FIND YOUR NEXT FEW LINES

Results for “Context & shared state”

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

509 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
C#Collections & data structures

Find values common to two collections

C#: Intersect returns distinct values shared by the inputs.

C#✓ Tested
SQLRelationships & missing data

Generate every combination of two sets

SQL: CROSS JOIN creates one result per possible pair, so the output size is the product of the input sizes.

SQL✓ Tested
SQL ServerRelationships & missing data

Generate every combination of two sets

SQL Server: CROSS JOIN creates one result per possible pair, so the output size is the product of the input sizes.

SQL Server✓ Tested
PostgresRelationships & missing data

Generate every combination of two sets

Postgres: CROSS JOIN creates one result per possible pair, so the output size is the product of the input sizes.

Postgres✓ Tested
SQLiteRelationships & missing data

Generate every combination of two sets

SQLite: CROSS JOIN creates one result per possible pair, so the output size is the product of the input sizes.

SQLite✓ Tested
SQLReporting & grouped calculations

Group by more than one field

SQL: Each distinct combination of grouping fields produces its own row.

SQL✓ Tested
SQL ServerReporting & grouped calculations

Group by more than one field

SQL Server: Each distinct combination of grouping fields produces its own row.

SQL Server✓ Tested
PostgresReporting & grouped calculations

Group by more than one field

Postgres: Each distinct combination of grouping fields produces its own row.

Postgres✓ Tested