Quick Reference
SQL Commands At a Glance.
The core commands covered in this lab. Click any table name in the schema panel to auto-insert it.
🔍
SELECT / WHERE
Filtering Data
Retrieve rows matching conditions. Use AND / OR / IN / BETWEEN / LIKE for filtering. The foundation of every query.
📊
GROUP BY / HAVING
Aggregating Data
Combine rows with COUNT, SUM, AVG, MAX, MIN. Use HAVING to filter aggregated results (like WHERE but for groups).
🔗
JOIN
Combining Tables
INNER JOIN returns matching rows. LEFT JOIN keeps all left-side rows. Used to link employees to departments, projects, and more.
📋
ORDER BY / LIMIT
Sorting & Paging
Sort results ASC or DESC on any column. LIMIT caps the number of rows returned. Combine both for pagination.
🪆
Subqueries
Queries Within Queries
Nest a SELECT inside WHERE or FROM. Use IN (subquery) to filter against a dynamic list, or correlated subqueries for per-row logic.
🔤
String Functions
Working With Text
UPPER, LOWER, LENGTH, SUBSTR, REPLACE, TRIM. SQLite also supports LIKE with % and _ wildcards for pattern matching.