FIND YOUR NEXT FEW LINES

Results for “Reporting & grouped calculations”

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

91 snippets foundClear filters
SQLReporting & grouped calculations

Filter rows before grouping

SQL: WHERE limits the rows contributing to the aggregate; it differs from filtering completed groups with HAVING.

SQL✓ Tested
SQL ServerReporting & grouped calculations

Filter rows before grouping

SQL Server: WHERE limits the rows contributing to the aggregate; it differs from filtering completed groups with HAVING.

SQL Server✓ Tested
PostgresReporting & grouped calculations

Filter rows before grouping

Postgres: WHERE limits the rows contributing to the aggregate; it differs from filtering completed groups with HAVING.

Postgres✓ Tested
SQLiteReporting & grouped calculations

Filter rows before grouping

SQLite: WHERE limits the rows contributing to the aggregate; it differs from filtering completed groups with HAVING.

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
SQLiteReporting & grouped calculations

Group by more than one field

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

SQLite✓ Tested
SQLReporting & grouped calculations

Return zero for a sum over no rows

SQL: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.

SQL✓ Tested
SQL ServerReporting & grouped calculations

Return zero for a sum over no rows

SQL Server: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.

SQL Server✓ Tested
PostgresReporting & grouped calculations

Return zero for a sum over no rows

Postgres: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.

Postgres✓ Tested
SQLiteReporting & grouped calculations

Return zero for a sum over no rows

SQLite: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.

SQLite✓ Tested