You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are my solutions to all SQL problems on leetcode.
Rank
-- how to do rank with out window functionselectt1.category, count(distinct t2.id) as dense_rank
from table t1, table t2
wheret1.id=t2.idandt1.value<=t2.valuegroup byt1.category