question about RANK and TOP

Database
Enthusiast

question about RANK and TOP

SELECT TOP 100 sku,
store,
amt,
RANK()OVER (PARTITION BY store
ORDER BY amt DESC)
FROM trnsact;

Not really I want

The following is what I want and I only want the top 5 line, how can I do it

SELECT sku,
store,
amt,
RANK()OVER (PARTITION BY store
ORDER BY amt DESC)
FROM trnsact;

another example is

SELECT TOP 50 sku,
SUM(orgprice+amt) AS total_price,
RANK()OVER(ORDER BY total_price DESC) AS price_rank
FROM transact
GROUP BY sku;

SELECT sku, SUM(orgprice+amt) AS total_price, RANK()OVER(ORDER BY total_price DESC) AS price_rankFROM trnsactGROUP BY sku ORDER BY price_rank;

There is no need for using “ORDER BY“ THE same results