![]() |
|
Archives of the TeradataForumMessage Posted: Wed, 14 Apr 2004 @ 10:49:52 GMT
Hi, Try this one:
Select target from table
where definition in (42,44,55)
group by definition
qualify rank (date desc)=1
last top10 targets you get by following clause:
Select target, date from table
where definition in (42,44,55)
group by definition
qualify rank (date desc)<=10
Thanks Henry
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||