Sector file // sql
SQLDECODED.
Joins, indexes & queries
82 Questions56.3k Views3.4k Upvotes
15 easy51 med16 hard
Easy
2 questionsMedium
8 questionsHow do you aggregate values into a single string?
DSA ยท 1.1k views ยท string-agg
Views:1.1kLikes:22
Why might EXISTS outperform a JOIN for existence checks?
DSA ยท 948 views ยท exists, performance
Views:948Likes:35
What is the difference between EXISTS and IN?
DSA ยท 762 views ยท exists-in
Views:762Likes:63
What is a CTE (Common Table Expression)?
DSA ยท 732 views ยท cte
Views:732Likes:73
What is the difference between NOT IN and NOT EXISTS when NULLs are involved?
DSA ยท 585 views ยท null, anti-join
Views:585Likes:71
Seq Scan vs Index Scan vs Index-Only Scan โ when does Postgres choose each?
System Design ยท 552 views ยท index, seq-scan, performance
Views:552Likes:0
What is a self join?
DSA ยท 113 views ยท self-join
Views:113Likes:37
Recursive CTE for an org chart โ how do you list all reports (direct + indirect) of a manager?
DSA ยท 86 views ยท recursive-cte, hierarchy, org-chart
Views:86Likes:80
Hard
3 questionsJSONB vs normalized columns vs EAV โ how do you model flexible attributes without killing query performance?
System Design ยท 1.1k views ยท jsonb, data-modeling, schema-design
Views:1.1kLikes:58
RANK() vs DENSE_RANK() vs ROW_NUMBER() โ when does the gap matter and how do you choose?
DSA ยท 1.1k views ยท window-functions, ranking, dense-rank
Views:1.1kLikes:48
LATERAL vs Window Function vs Correlated Subquery for top-N per group โ which scales when?
System Design ยท 221 views ยท lateral-join, query-planning, performance
Views:221Likes:79
Seen a SQL question that is not here? Add it and help the next candidate.
Share a question