FIND YOUR NEXT FEW LINES

Results for “COUNT”

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

200 snippets foundClear filters
Linux CommandsStreams & byte tools

Count whitespace-separated words

Linux Commands: Use wc -w with standard input to omit the filename column.

Linux Commands✓ 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
SQLReporting & grouped calculations

Distinguish row count from non-null value count

SQL: COUNT(*) includes every row while COUNT(column) skips NULL values.

SQL✓ Tested
SQL ServerReporting & grouped calculations

Distinguish row count from non-null value count

SQL Server: COUNT(*) includes every row while COUNT(column) skips NULL values.

SQL Server✓ Tested
PostgresReporting & grouped calculations

Distinguish row count from non-null value count

Postgres: COUNT(*) includes every row while COUNT(column) skips NULL values.

Postgres✓ Tested
SQLiteReporting & grouped calculations

Distinguish row count from non-null value count

SQLite: COUNT(*) includes every row while COUNT(column) skips NULL values.

SQLite✓ Tested
C++Text validation & parsing

Extract a substring with an explicit count

C++: The second substr argument is a length rather than an ending index.

C++✓ Tested
GitCommit history & revision selection

Find a commit that changed the count of a text string

Git: The pickaxe -S option finds commits that add or remove occurrences of a literal string.

Git✓ Tested
SQLRelationships & missing data

Include zero counts for missing relationships

SQL: Count the non-null child key after a left join so a missing relationship produces zero.

SQL✓ Tested