Turning Learners Into Developers
Codekilla
CODEKILLA
// examples.sql()

SQL examples.

Talk to data.

SQL131 programs runnable inline14 chapters
Chapter 01 of 14·1 programs

SQL — Starter Programs

Minimal runnable programs to get you started with SQL. Admins can add more via the admin panel or the AI bulk-generate button.

Chapter 02 of 14·10 programs

SELECT Basics

SELECT *, column list, DISTINCT, AS aliases, simple WHERE, ORDER BY

Chapter 03 of 14·10 programs

Filtering & Operators

WHERE with AND/OR/NOT, IN, BETWEEN, LIKE patterns, IS NULL, comparison ops

Chapter 04 of 14·10 programs

Aggregates & GROUP BY

COUNT, SUM, AVG, MIN, MAX, GROUP BY, HAVING, multi-key grouping

Chapter 05 of 14·10 programs

JOINs

INNER, LEFT, RIGHT, FULL OUTER, CROSS, SELF join, USING vs ON

Chapter 06 of 14·10 programs

Subqueries

scalar subquery, IN-subquery, EXISTS, correlated subquery, derived table in FROM

Chapter 07 of 14·10 programs

INSERT / UPDATE / DELETE

INSERT single & multi-row, UPDATE with WHERE, DELETE with JOIN, RETURNING (PG)

Chapter 08 of 14·10 programs

DDL & Constraints

CREATE TABLE, PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK, NOT NULL, DEFAULT, ALTER, DROP

Chapter 09 of 14·10 programs

Indexes & Performance

CREATE INDEX, composite index, EXPLAIN/EXPLAIN ANALYZE, ANALYZE, table stats

Chapter 10 of 14·10 programs

Indexes & Performance

CREATE INDEX, composite index, EXPLAIN/EXPLAIN ANALYZE, ANALYZE, table stats

Chapter 11 of 14·10 programs

Window Functions

ROW_NUMBER, RANK, DENSE_RANK, LAG/LEAD, SUM OVER, PARTITION BY, frame clauses

Chapter 12 of 14·10 programs

Window Functions

ROW_NUMBER, RANK, DENSE_RANK, LAG/LEAD, SUM OVER, PARTITION BY, frame clauses

Chapter 13 of 14·10 programs

Real-world Queries

monthly sales report, top-N per category, gap-and-island, running total, customer cohorts, duplicate-finder, latest-row-per-group, slowly-changing-dim, recursive org chart, anti-join missing-data

Chapter 14 of 14·10 programs

Real-world Queries

monthly sales report, top-N per category, gap-and-island, running total, customer cohorts, duplicate-finder, latest-row-per-group, slowly-changing-dim, recursive org chart, anti-join missing-data