I have one table table1
from that i need to show top 5 OS based on the highest counts
i need to group them on three columns os,device,model
When i executed below query I didnt get any result.
Whats wrong in the below query?
SELECT * FROM
(SELECT distinct os, count,
DENSE_RANK () OVER (PARTITION BY os ORDER BY count DESC)rn
FROM (Select os ,device,model,SUM(cal_count) as count
group by os,device,model)b ) a
WHERE a.rn = 5