![]() |
|
Archives of the TeradataForumMessage Posted: Thu, 02 Dec 2004 @ 22:48:06 GMT
Hi: Not sure if you are after the same info, but try this:
SELECT country, state, RANK(county)
FROM (
SELECT country, state, county
FROM region
) as a1
order by 1,2,3
QUALIFY RANK(county) <=50;
Thanks & Regards, Pete
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||