Results for “string_agg”
Small, practical examples. Search by task or narrow things down below.
Track which union member is currently valid
C: An explicit tag tells callers which overlaid union value to read.
C✓ Tested
Trim surrounding whitespace
Trim surrounding whitespace using a complete Go program with explicit sample inputs.
Go✓ Tested
Trim whitespace around text
Trim whitespace around text in a complete Rust program using the standard library.
Rust✓ Tested
Use a literal value in a regular expression
PowerShell: Regex.Escape prevents a literal dot or other metacharacter from changing the match.
PowerShell✓ Tested
Attach an overall count to every row
SQL: An uncorrelated scalar subquery supplies the same aggregate to each output row.
SQL✓ Tested
Attach an overall count to every row
SQL Server: An uncorrelated scalar subquery supplies the same aggregate to each output row.
SQL Server✓ Tested
Attach an overall count to every row
Postgres: An uncorrelated scalar subquery supplies the same aggregate to each output row.
Postgres✓ Tested
Attach an overall count to every row
SQLite: An uncorrelated scalar subquery supplies the same aggregate to each output row.
SQLite✓ Tested
Build a query from several named stages
SQL: Separate row selection from aggregation using two common table expressions.
SQL✓ Tested
Build a query from several named stages
SQL Server: Separate row selection from aggregation using two common table expressions.
SQL Server✓ Tested
Build a query from several named stages
Postgres: Separate row selection from aggregation using two common table expressions.
Postgres✓ Tested
Build a query from several named stages
SQLite: Separate row selection from aggregation using two common table expressions.
SQLite✓ Tested