FIND YOUR NEXT FEW LINES

Results for “SQL Server”

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

502 snippets foundClear filters
SQLiteWindow analytics

Calculate a cumulative integer percentage

SQLite: Divide a running window sum by the complete total using a unique ordering key.

SQLite✓ Tested
SQLGetting Started

Calculate a total for each group

SQL: Group nonmissing categories and calculate separate totals.

SQL✓ Tested
SQLiteGetting Started

Calculate a total for each group

SQLite: Group nonmissing categories and calculate separate totals.

SQLite✓ Tested
SQLReporting & grouped calculations

Calculate each group’s integer percentage of the total

SQL: Multiply before division and protect against a zero denominator.

SQL✓ Tested
SQLiteReporting & grouped calculations

Calculate each group’s integer percentage of the total

SQLite: Multiply before division and protect against a zero denominator.

SQLite✓ Tested
SQLReporting & grouped calculations

Calculate each group’s numeric spread

SQL: Subtract MIN from MAX to report the difference between extremes.

SQL✓ Tested
SQLiteReporting & grouped calculations

Calculate each group’s numeric spread

SQLite: Subtract MIN from MAX to report the difference between extremes.

SQLite✓ Tested
SQLBulk changes & set operations

Combine results while retaining duplicates

SQL: UNION ALL does not spend work removing equal rows.

SQL✓ Tested
SQLiteBulk changes & set operations

Combine results while retaining duplicates

SQLite: UNION ALL does not spend work removing equal rows.

SQLite✓ Tested
SQLText cleanup & matching

Combine text values with a separator

SQL: Use the concatenation operator supported by the selected SQL dialect.

SQL✓ Tested
SQLiteText cleanup & matching

Combine text values with a separator

SQLite: Use the concatenation operator supported by the selected SQL dialect.

SQLite✓ Tested
SQLSchema design & transactions

Commit multiple related changes together

SQL: The first transaction prepares the fixtures. The second commits both updates as one unit.

SQL✓ Tested