FIND YOUR NEXT FEW LINES

Results for “array_agg”

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

198 snippets foundClear filters
SQL ServerJSON & results

Serialize query rows as JSON

Return a JSON array directly from a SELECT.

FOR JSON✓ Tested
Docker / ComposeBuild images

Set an image’s default command

Use JSON array syntax for a predictable command.

Dockerfile✓ Tested
jQueryForm serialization & state

Set several selected options

jQuery: Passing an array to val selects matching values in a multiple select.

jQuery✓ Tested
SQLWindow analytics

Show a group total beside each detail row

SQL: A partitioned aggregate preserves detail rows instead of collapsing them with GROUP BY.

SQL✓ Tested
SQL ServerWindow analytics

Show a group total beside each detail row

SQL Server: A partitioned aggregate preserves detail rows instead of collapsing them with GROUP BY.

SQL Server✓ Tested
PostgresWindow analytics

Show a group total beside each detail row

Postgres: A partitioned aggregate preserves detail rows instead of collapsing them with GROUP BY.

Postgres✓ Tested
SQLiteWindow analytics

Show a group total beside each detail row

SQLite: A partitioned aggregate preserves detail rows instead of collapsing them with GROUP BY.

SQLite✓ Tested
JavaScriptArrays

Sort numbers numerically

Supply a numeric comparator instead of JavaScript string sorting.

JavaScript✓ Tested
C#LINQ transformations

Split values into fixed-size chunks

C#: Enumerable.Chunk creates arrays and allows a shorter final chunk.

C#✓ Tested
JavaScriptArrays

Sum numeric values

Provide an initial accumulator for JavaScript reduce, including empty arrays.

JavaScript✓ Tested
SQLExpressions & aggregates

Sum values per category

Calculate a grouped total.

SUM✓ Tested
C#LINQ transformations

Transform each item with Select

C#: Project each input value into a new value without modifying the source array.

C#✓ Tested