Results for “query”
Small, practical examples. Search by task or narrow things down below.
Insert a row with named columns
Add a record without relying on implicit column order.
INSERT✓ Tested
Keep unmatched rows with LEFT JOIN
Show every product even when stock is missing.
LEFT JOIN✓ Tested
Label rows with CASE
Derive a readable label from a condition.
CASE✓ Tested
List distinct values
Remove duplicate category values from a result.
DISTINCT✓ Tested
Match one of several values
Use IN to avoid repeating equality conditions.
IN✓ Tested
Read a scalar JSON property
Extract a named value using a JSON path.
JSON_VALUE✓ Tested
Remove duplicate values while keeping the smallest key
SQL: Identify retained keys in a grouped subquery before deleting other copies.
SQL✓ Tested
Remove duplicate values while keeping the smallest key
SQL Server: Identify retained keys in a grouped subquery before deleting other copies.
SQL Server✓ Tested
Remove duplicate values while keeping the smallest key
Postgres: Identify retained keys in a grouped subquery before deleting other copies.
Postgres✓ Tested
Remove duplicate values while keeping the smallest key
SQLite: Identify retained keys in a grouped subquery before deleting other copies.
SQLite✓ Tested
Replace NULL in a result
Choose a fallback for a missing value.
COALESCE✓ Tested
Return an inserted row
Read generated data directly from INSERT.
RETURNING✓ Tested