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 · 48hPractice on this line
Segments on this line
- Q1 · SQL Basics11 stations · 47m · SELECT, WHERE, ORDER BY, LIMIT and NULL handling: the queries everything else builds on.
- Q2 · Aggregation & GROUP BY45 stations · 6.4h · COUNT, SUM, AVG with GROUP BY and HAVING, ratios and percentages.
- Q3 · Joins49 stations · 8.1h · Inner, left, self and cross joins, and finding rows that have no match.
- Q4 · Subqueries31 stations · 4.7h · Scalar, IN / NOT IN, EXISTS and correlated subqueries; Nth highest and 'bought all' problems.
- Q5 · CTEs7 stations · 58m · WITH clauses to break a hard query into readable steps.
- Q6 · Window Functions72 stations · 12h · ROW_NUMBER, RANK, DENSE_RANK, LAG/LEAD, running totals, top-N per group and gaps & islands.
- Q7 · Date & Time25 stations · 3.9h · Date arithmetic, ranges, day/week/month bucketing and comparing consecutive days.
- Q8 · Conditional Logic (CASE)26 stations · 3.7h · CASE WHEN for categories, conditional counts and swapping values.
- Q9 · String Functions21 stations · 2.7h · CONCAT, SUBSTRING, string aggregation and regular expressions.
- Q10 · Recursive CTEs14 stations · 3.3h · Generating sequences and walking hierarchies with WITH RECURSIVE.
- Q11 · Pivoting3 stations · 26m · Turning rows into columns and columns into rows.
- Q12 · Data Modification1 stations · 7m · UPDATE and DELETE: changing data safely in place.
- Q13 · Advanced / Interview Mix4 stations · 52m · Hard problems that combine several techniques.