$ man cheatsheets
SQL & pandas cheat sheets
Copy-paste syntax for the patterns that come up in real work and interviews. Every sheet has a live example you can run and links to practice problems.
SQL
SQL joins
INNER, LEFT, FULL, CROSS and self-joins, with the row-count gotchas interviewers love.
open sheetSQL window functions
ROW_NUMBER, RANK, running totals, LAG/LEAD and moving averages in one page.
open sheetSQL CTEs
WITH clauses, chained CTEs and recursive queries for readable multi-step SQL.
open sheetSQL dates and times
Truncate, extract, add intervals and bucket by month — SQLite syntax with Postgres equivalents.
open sheetSQL strings and pattern matching
LIKE, SUBSTR, INSTR, REPLACE, case handling and concatenation.
open sheetpandas
pandas indexing and selection
loc, iloc, boolean masks, query() and column selection without SettingWithCopy warnings.
open sheetpandas groupby and pivot
Named aggregation, transform, pivot_table and crosstab patterns.
open sheetpandas merge and concat
SQL-style joins with merge, stacking frames with concat, and validating join keys.
open sheetpandas missing values
Find, drop and fill NaN / None, plus how nulls behave in groupby and comparisons.
open sheet