FIND YOUR NEXT FEW LINES

Results for “SQL”

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

500 snippets foundClear filters
SQLiteSchema design & transactions

Enforce uniqueness with a dedicated index

SQLite: A unique index rejects a duplicate combination independently of query plans.

SQLite✓ Tested
SQLSchema design & transactions

Expose a reusable filtered view

SQL: A view stores a query definition rather than a snapshot of its rows.

SQL✓ Tested
SQL ServerSchema design & transactions

Expose a reusable filtered view

SQL Server: A view stores a query definition rather than a snapshot of its rows.

SQL Server✓ Tested
SQLiteSchema design & transactions

Expose a reusable filtered view

SQLite: A view stores a query definition rather than a snapshot of its rows.

SQLite✓ Tested
SQLGetting Started

Filter by a numeric comparison

SQL: Keep rows whose quantity exceeds a chosen threshold.

SQL✓ Tested
SQL ServerGetting Started

Filter by a numeric comparison

SQL Server: Keep rows whose quantity exceeds a chosen threshold.

SQL Server✓ Tested
SQLiteGetting Started

Filter by a numeric comparison

SQLite: Keep rows whose quantity exceeds a chosen threshold.

SQLite✓ Tested
SQLGetting Started

Filter groups after aggregation

SQL: Use HAVING to test a group’s calculated total.

SQL✓ Tested
SQL ServerGetting Started

Filter groups after aggregation

SQL Server: Use HAVING to test a group’s calculated total.

SQL Server✓ Tested
SQLiteGetting Started

Filter groups after aggregation

SQLite: Use HAVING to test a group’s calculated total.

SQLite✓ Tested
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