Results for “state”
Small, practical examples. Search by task or narrow things down below.
Select an inclusive range
Find rows with values between two endpoints.
BETWEEN✓ Tested
Select specific columns
Read only the fields a result needs.
SELECT✓ Tested
Select the top row in each group with a tie-breaker
SQL: Filter an outer query on ROW_NUMBER because window functions are not evaluated in WHERE.
SQL✓ Tested
Select the top row in each group with a tie-breaker
SQL Server: Filter an outer query on ROW_NUMBER because window functions are not evaluated in WHERE.
SQL Server✓ Tested
Select the top row in each group with a tie-breaker
Postgres: Filter an outer query on ROW_NUMBER because window functions are not evaluated in WHERE.
Postgres✓ Tested
Select the top row in each group with a tie-breaker
SQLite: Filter an outer query on ROW_NUMBER because window functions are not evaluated in WHERE.
SQLite✓ Tested
Set and inspect a bit flag
Store several boolean states in one byte.
bitSet✓ Tested
Show a group total beside each detail row
SQL: A partitioned aggregate preserves detail rows instead of collapsing them with GROUP BY.
SQL✓ Tested
Show a group total beside each detail row
SQL Server: A partitioned aggregate preserves detail rows instead of collapsing them with GROUP BY.
SQL Server✓ Tested
Show a group total beside each detail row
Postgres: A partitioned aggregate preserves detail rows instead of collapsing them with GROUP BY.
Postgres✓ Tested
Show a group total beside each detail row
SQLite: A partitioned aggregate preserves detail rows instead of collapsing them with GROUP BY.
SQLite✓ Tested
Sort preferred rows ahead of other rows
SQL: A CASE ordering key expresses business priority before a stable secondary sort.
SQL✓ Tested