Concept Flow - JSON aggregation with JSON_AGG
Start Query
Select rows from table
Extract JSON objects from each row
Aggregate JSON objects into JSON array
Return single JSON array as result
End Query
The query selects rows, converts each row to a JSON object, then combines all these JSON objects into a single JSON array using JSON_AGG.