Re: Two Queries (sorted) Into One
One way ...
select a.*
from thedata a
join (
select key, max(date) as latest
from thedata
where key in(2,3)
group by key
) b on a.key=b.key and a.date=b.latest;
Other approaches under "Within-group aggregates" at
http://www.artfulsoftware.com/queries.php
Subject
Written By
Posted
November 04, 2015 06:06PM
Re: Two Queries (sorted) Into One
November 04, 2015 09:07PM
November 05, 2015 11:29AM
November 05, 2015 12:03PM
November 26, 2015 10:09PM
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.