Results for “array_agg”
Small, practical examples. Search by task or narrow things down below.
Check JSONB containment
Test whether an object contains a key-value pair.
jsonb✓ Tested
Compare a row with its own group average
SQL: A correlated aggregate computes a different comparison value for each group.
SQL✓ Tested
Compare a row with its own group average
SQL Server: A correlated aggregate computes a different comparison value for each group.
SQL Server✓ Tested
Compare a row with its own group average
Postgres: A correlated aggregate computes a different comparison value for each group.
Postgres✓ Tested
Compare a row with its own group average
SQLite: A correlated aggregate computes a different comparison value for each group.
SQLite✓ Tested
Compare with a calculated value
Find products above the average price.
subquery✓ Tested
Count matching values
Count even numbers in a fixed C array.
C✓ Tested
Filter even numbers
Create a JavaScript array containing only even values.
JavaScript✓ Tested
Give an existing image another tag
Docker / Compose: Tagging adds a reference without copying the image layers.
Docker / Compose✓ Tested
Group records into map entries
JavaScript: Initialize an array for a missing Map key before appending its values.
JavaScript✓ Tested
Group records into map entries
TypeScript: Initialize an array for a missing Map key before appending its values.
TypeScript✓ Tested
Handle a filename pattern with no matches
Use nullglob so an unmatched pattern produces an empty array.
nullglob✓ Tested