Results for “missing data”
Small, practical examples. Search by task or narrow things down below.
Format a timestamp with to_char
Produce a fixed numeric date string.
to_char✓ Tested
Generate a bounded sequence recursively
Use a recursive CTE with a recursion limit.
recursive CTE✓ Tested
Generate a sequence of numbers
Create rows without a stored table.
generate_series✓ Tested
Get the latest row in each group
Select one ordered row per key with DISTINCT ON.
DISTINCT ON✓ Tested
Give a function an optional argument
Let callers omit a value while keeping nounset enabled.
optional argument✓ Tested
Give a result column a readable name
SQL: Use AS to label a computed result column.
SQL✓ Tested
Give a result column a readable name
SQL Server: Use AS to label a computed result column.
SQL Server✓ Tested
Give an optional property a default
Handle missing object fields with nullish coalescing.
optional✓ Tested
Group by more than one field
SQL: Each distinct combination of grouping fields produces its own row.
SQL✓ Tested
Group by more than one field
SQL Server: Each distinct combination of grouping fields produces its own row.
SQL Server✓ Tested
Group by more than one field
Postgres: Each distinct combination of grouping fields produces its own row.
Postgres✓ Tested
Group by more than one field
SQLite: Each distinct combination of grouping fields produces its own row.
SQLite✓ Tested