πŸ—„οΈ Search by intent Β· PostgreSQL Β· MySQL Β· SQLite Β· Copy-paste

SQL Reference

Find the right SQL query by describing what you want to do β€” JOINs, aggregations, window functions, CTEs and more with plain English explanations.

🌱

Basics

SELECT, WHERE, ORDER BY, INSERT, UPDATE, DELETE

πŸ”Ž

Filtering

AND/OR, IN, LIKE, NULL, BETWEEN

πŸ”—

Joins

INNER, LEFT, RIGHT, FULL OUTER, self-join

πŸ“Š

Aggregation

COUNT, SUM, AVG, GROUP BY, HAVING

πŸͺ†

Subqueries

Nested queries, EXISTS, correlated subqueries

✏️

Modifying Data

INSERT, UPDATE, DELETE, UPSERT

πŸ—οΈ

Schema

CREATE TABLE, ALTER, indexes, constraints

⚑

Advanced

CTEs, window functions, JSON, EXPLAIN

About This Reference

This SQL reference is organized by what you are trying to do, not by command name. Whether you need to join two tables, find the top N rows per group, delete duplicates, or understand window functions β€” search by intent and get the right query with a plain English explanation and copy-paste example.

Each entry includes dialect notes for PostgreSQL, MySQL, SQLite and SQL Server where syntax differs. Common mistakes are highlighted so you avoid the most frequent pitfalls.