#836

Build a single chronological array of each customer's amounts

For audit purposes we want every customer's full order history in a single report row — an array of all their order amounts in chronological order. For every customer build an array of order amounts ordered by creation date. Sort by customer id.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

amountscustomer_id
[100, 200, 300]1
[500, 150]2
[800, 400, 250]3

Your query result will appear here