Interview prep and study
SQL Top 50 study database
A local Postgres database with a schema, sample rows, a practice worksheet, and a solution for each of LeetCode's Top SQL 50 problems.
View code on GitHubProblem
LeetCode’s SQL problems run in a browser sandbox on MySQL. I wanted to practice the same ideas locally on Postgres, where I could inspect plans and experiment.
Goals
make upstarts Postgres in Docker andmake psqlconnects- Each of the 50 problems has its own schema and the official-style sample rows
- Practice worksheets grouped by topic (
01_select.sql,02_joins.sql,03_aggregates.sql, and so on), with separate solutions STUDY_GUIDE.mdand comments in the solutions point out where MySQL and Postgres differ
Changelog
- 2026-08-16: Built