SQL Cheat Sheets
Quick reference guides for SQL syntax. Bookmark these pages for easy access during coding and interviews.
All Cheat Sheets
MySQL: SQL Aggregate Functions Cheat Sheet
MySQL guide: Reference for COUNT, SUM, AVG, MIN, MAX and GROUP BY usage.
MySQL: SQL Common Table Expressions (CTEs) Cheat Sheet
MySQL guide: Reference for WITH clause and recursive CTEs.
MySQL: SQL Data Types Cheat Sheet
MySQL guide: Reference for common SQL data types across databases.
MySQL: SQL Date Functions Cheat Sheet
MySQL guide: Reference for date manipulation, formatting, and calculations.
MySQL: SQL JOINs Cheat Sheet
MySQL guide: Complete reference for all SQL JOIN types with syntax and examples.
MySQL: SQL String Functions Cheat Sheet
MySQL guide: Reference for CONCAT, SUBSTRING, TRIM, UPPER, LOWER, and pattern matching.
MySQL: SQL Subqueries Cheat Sheet
MySQL guide: Reference for scalar, table, and correlated subqueries.
MySQL: SQL Window Functions Cheat Sheet
MySQL guide: Complete guide to ROW_NUMBER, RANK, LAG, LEAD, and frame specifications.
PostgreSQL: SQL Aggregate Functions Cheat Sheet
PostgreSQL guide: Reference for COUNT, SUM, AVG, MIN, MAX and GROUP BY usage.
PostgreSQL: SQL Common Table Expressions (CTEs) Cheat Sheet
PostgreSQL guide: Reference for WITH clause and recursive CTEs.
PostgreSQL: SQL Data Types Cheat Sheet
PostgreSQL guide: Reference for common SQL data types across databases.
PostgreSQL: SQL Date Functions Cheat Sheet
PostgreSQL guide: Reference for date manipulation, formatting, and calculations.
PostgreSQL: SQL JOINs Cheat Sheet
PostgreSQL guide: Complete reference for all SQL JOIN types with syntax and examples.
PostgreSQL: SQL String Functions Cheat Sheet
PostgreSQL guide: Reference for CONCAT, SUBSTRING, TRIM, UPPER, LOWER, and pattern matching.
PostgreSQL: SQL Subqueries Cheat Sheet
PostgreSQL guide: Reference for scalar, table, and correlated subqueries.
PostgreSQL: SQL Window Functions Cheat Sheet
PostgreSQL guide: Complete guide to ROW_NUMBER, RANK, LAG, LEAD, and frame specifications.
SQL Aggregate Functions Cheat Sheet
Reference for COUNT, SUM, AVG, MIN, MAX and GROUP BY usage.
SQL Common Table Expressions (CTEs) Cheat Sheet
Reference for WITH clause and recursive CTEs.
SQL Data Types Cheat Sheet
Reference for common SQL data types across databases.
SQL Date Functions Cheat Sheet
Reference for date manipulation, formatting, and calculations.
SQL JOINs Cheat Sheet
Complete reference for all SQL JOIN types with syntax and examples.
SQL Server: SQL Aggregate Functions Cheat Sheet
SQL Server guide: Reference for COUNT, SUM, AVG, MIN, MAX and GROUP BY usage.
SQL Server: SQL Common Table Expressions (CTEs) Cheat Sheet
SQL Server guide: Reference for WITH clause and recursive CTEs.
SQL Server: SQL Data Types Cheat Sheet
SQL Server guide: Reference for common SQL data types across databases.
SQL Server: SQL Date Functions Cheat Sheet
SQL Server guide: Reference for date manipulation, formatting, and calculations.
SQL Server: SQL JOINs Cheat Sheet
SQL Server guide: Complete reference for all SQL JOIN types with syntax and examples.
SQL Server: SQL String Functions Cheat Sheet
SQL Server guide: Reference for CONCAT, SUBSTRING, TRIM, UPPER, LOWER, and pattern matching.
SQL Server: SQL Subqueries Cheat Sheet
SQL Server guide: Reference for scalar, table, and correlated subqueries.
SQL Server: SQL Window Functions Cheat Sheet
SQL Server guide: Complete guide to ROW_NUMBER, RANK, LAG, LEAD, and frame specifications.
SQL String Functions Cheat Sheet
Reference for CONCAT, SUBSTRING, TRIM, UPPER, LOWER, and pattern matching.
SQL Subqueries Cheat Sheet
Reference for scalar, table, and correlated subqueries.
SQL Window Functions Cheat Sheet
Complete guide to ROW_NUMBER, RANK, LAG, LEAD, and frame specifications.
All Reference Guides
Need more practice?
Try our interactive SQL exercises to apply what you've learned.
Practice SQL Exercises