Sector file // sql
SQLDECODED.
Joins, indexes & queries
82 Questions56.3k Views3.4k Upvotes
15 easy51 med16 hard
Medium
2 questionsTop-N per group with RANK() OVER (PARTITION BY) — how do you get top 2 per department without collapsing rows?
DSA · 1.2k views · window-functions, rank, partition
Views:1.2kLikes:74
LATERAL JOIN — how do you fetch the top 3 orders per customer efficiently?
DSA · 1.1k views · lateral-join, top-n, postgres
Views:1.1kLikes:39
Hard
2 questionsSeen a SQL question that is not here? Add it and help the next candidate.
Share a question