Re: Avoid subquery
> I would like to avoid an expensive Subquery
Why assume all subqueries are expensive? In the FROM clause, for example, they're often quick:
SELECT a.father, a.name, a.age
FROM child as a
JOIN (
SELECT father, max(age) AS oldest
FROM child
GROUP BY father
) as b ON a.father = b.father and a.age = b.oldest;
Subject
Views
Written By
Posted
1810
May 12, 2015 08:40AM
Re: Avoid subquery
965
May 12, 2015 11:06AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.