FIND YOUR NEXT FEW LINES

Results for “Collections & data structures”

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

694 snippets foundClear filters
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
SQLGetting Started

Count the rows in a table

SQL: COUNT(*) includes every row, including rows with NULL columns.

SQL✓ Tested
SQL ServerGetting Started

Count the rows in a table

SQL Server: COUNT(*) includes every row, including rows with NULL columns.

SQL Server✓ Tested
JavaCollections

Count word frequencies

Use Map.merge to count repeated words in Java.

Java✓ Tested
C++Collections

Count word frequencies

Accumulate word counts in an ordered C++ map.

C++✓ Tested
TypeScriptCollections & records

Count words using a Map

Update a keyed counter without losing its value type.

Map✓ Tested
C#Collections

Count words with GroupBy

Group repeated C# words and print ordered counts.

C#✓ Tested
HTMLData & disclosure

Create a native disclosure

Use details and summary to show optional HTML content without JavaScript.

HTML✓ Tested
SQLGetting Started

Create a table and insert its first row

SQL: Define column types and a primary key, then insert one row using an explicit column list.

SQL✓ Tested
SQL ServerGetting Started

Create a table and insert its first row

SQL Server: Define column types and a primary key, then insert one row using an explicit column list.

SQL Server✓ Tested