Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

How to not to skip a RANK ? - response (3) by Qaisar Aftab Kiani

$
0
0
If I understand correctly, you just want top 100 values according to the sales so you can put a limit using QUALIFY clause... SELECT STORE, ITEM, SALES, ROW_NUMBER() OVER(PARTITION BY SALES ORDER BY SALES DESC) RN FROM <<TABLE>> QUALIFY RN <= 100 

Viewing all articles
Browse latest Browse all 27759

Trending Articles