Skip to content
Avio Lines
Q

SQL & DBMS

SQL from SELECT to window functions and recursive CTEs, through LeetCode's SQL problems, plus the DBMS theory interviews ask about.

13 segments · 309 stations · 48h
Start this line →

Practice on this line

Segments on this line

  1. Q1 · SQL Basics11 stations · 47m · SELECT, WHERE, ORDER BY, LIMIT and NULL handling: the queries everything else builds on.

  2. Q2 · Aggregation & GROUP BY45 stations · 6.4h · COUNT, SUM, AVG with GROUP BY and HAVING, ratios and percentages.

  3. Q3 · Joins49 stations · 8.1h · Inner, left, self and cross joins, and finding rows that have no match.

  4. Q4 · Subqueries31 stations · 4.7h · Scalar, IN / NOT IN, EXISTS and correlated subqueries; Nth highest and 'bought all' problems.

  5. Q5 · CTEs7 stations · 58m · WITH clauses to break a hard query into readable steps.

  6. Q6 · Window Functions72 stations · 12h · ROW_NUMBER, RANK, DENSE_RANK, LAG/LEAD, running totals, top-N per group and gaps & islands.

  7. Q7 · Date & Time25 stations · 3.9h · Date arithmetic, ranges, day/week/month bucketing and comparing consecutive days.

  8. Q8 · Conditional Logic (CASE)26 stations · 3.7h · CASE WHEN for categories, conditional counts and swapping values.

  9. Q9 · String Functions21 stations · 2.7h · CONCAT, SUBSTRING, string aggregation and regular expressions.

  10. Q10 · Recursive CTEs14 stations · 3.3h · Generating sequences and walking hierarchies with WITH RECURSIVE.

  11. Q11 · Pivoting3 stations · 26m · Turning rows into columns and columns into rows.

  12. Q12 · Data Modification1 stations · 7m · UPDATE and DELETE: changing data safely in place.

  13. Q13 · Advanced / Interview Mix4 stations · 52m · Hard problems that combine several techniques.