SQL examples
Inspect the actual SQL, returned values, and PostgreSQL column types from the comparison fixtures.
JSON window aggregation
Each customer has a running JSON array ordered by invoice ID.
SELECT cust, jsonb_agg(amount) OVER (PARTITION BY cust ORDER BY id) FROM inv ORDER BY id Recorded results
SELECT 3 | # | custtext | jsonb_aggjsonb |
|---|---|---|
| 1 | acme | [100.50] |
| 2 | acme | [100.50, -20.25] |
| 3 | beta | [0.00] |
These examples use saved replay results. Run your own query or see the full comparison.