FIND YOUR NEXT FEW LINES

Results for “insert”

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

381 snippets foundClear filters
SQLReporting & grouped calculations

Count distinct values within a result

SQL: COUNT DISTINCT counts distinct non-null values.

SQL✓ Tested
SQL ServerReporting & grouped calculations

Count distinct values within a result

SQL Server: COUNT DISTINCT counts distinct non-null values.

SQL Server✓ Tested
PostgresReporting & grouped calculations

Count distinct values within a result

Postgres: COUNT DISTINCT counts distinct non-null values.

Postgres✓ Tested
SQLiteReporting & grouped calculations

Count distinct values within a result

SQLite: COUNT DISTINCT counts distinct non-null values.

SQLite✓ Tested
SQLExpressions & aggregates

Count rows per category

Aggregate rows sharing the same category.

GROUP BY✓ Tested
SQLReporting & grouped calculations

Count rows satisfying separate conditions

SQL: SUM over CASE expressions calculates several conditional counts in one scan.

SQL✓ Tested
SQL ServerReporting & grouped calculations

Count rows satisfying separate conditions

SQL Server: SUM over CASE expressions calculates several conditional counts in one scan.

SQL Server✓ Tested
PostgresReporting & grouped calculations

Count rows satisfying separate conditions

Postgres: SUM over CASE expressions calculates several conditional counts in one scan.

Postgres✓ Tested
SQLiteReporting & grouped calculations

Count rows satisfying separate conditions

SQLite: SUM over CASE expressions calculates several conditional counts in one scan.

SQLite✓ Tested
SQLSchema design & transactions

Create an index for an equality filter

SQL: A nonunique index can support lookups on a frequently filtered column.

SQL✓ Tested
SQL ServerSchema design & transactions

Create an index for an equality filter

SQL Server: A nonunique index can support lookups on a frequently filtered column.

SQL Server✓ Tested
PostgresSchema design & transactions

Create an index for an equality filter

Postgres: A nonunique index can support lookups on a frequently filtered column.

Postgres✓ Tested