FIND YOUR NEXT FEW LINES

Results for “Subqueries & ranked selection”

Small, practical examples. Search by task or narrow things down below.

99 snippets foundClear filters
SQLSubqueries & ranked selection

Find the second-highest distinct value

SQL: Select the maximum below the overall maximum to skip ties at the top.

SQL✓ Tested
SQL ServerSubqueries & ranked selection

Find the second-highest distinct value

SQL Server: Select the maximum below the overall maximum to skip ties at the top.

SQL Server✓ Tested
PostgresSubqueries & ranked selection

Find the second-highest distinct value

Postgres: Select the maximum below the overall maximum to skip ties at the top.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Find the second-highest distinct value

SQLite: Select the maximum below the overall maximum to skip ties at the top.

SQLite✓ Tested
SQLSubqueries & ranked selection

Include every row tied for the highest score

SQL: Compare with MAX rather than limiting to an arbitrary number of rows.

SQL✓ Tested
SQL ServerSubqueries & ranked selection

Include every row tied for the highest score

SQL Server: Compare with MAX rather than limiting to an arbitrary number of rows.

SQL Server✓ Tested
PostgresSubqueries & ranked selection

Include every row tied for the highest score

Postgres: Compare with MAX rather than limiting to an arbitrary number of rows.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Include every row tied for the highest score

SQLite: Compare with MAX rather than limiting to an arbitrary number of rows.

SQLite✓ Tested
SQLSubqueries & ranked selection

Include missing values in a not-equal filter

SQL: Ordinary inequality does not include NULL; explicitly include it when that is the intended rule.

SQL✓ Tested
SQL ServerSubqueries & ranked selection

Include missing values in a not-equal filter

SQL Server: Ordinary inequality does not include NULL; explicitly include it when that is the intended rule.

SQL Server✓ Tested
PostgresSubqueries & ranked selection

Include missing values in a not-equal filter

Postgres: Ordinary inequality does not include NULL; explicitly include it when that is the intended rule.

Postgres✓ Tested
SQLiteSubqueries & ranked selection

Include missing values in a not-equal filter

SQLite: Ordinary inequality does not include NULL; explicitly include it when that is the intended rule.

SQLite✓ Tested