Group records by specific field and return a list of matching records with all fields below them.

Hi,

I need help accomplishing this scenario:

I have a table with order events from an ecommerce platform:

I need to create an endpoint that will return me the list of records of this table, in each record it should display all fields, but they need to be grouped by "platform_order_id" field.

I think it would be done with the query all records aggregate, I have managed to set up the grouping part, but then I need to select the aggregation, and I don't know how to set it to display all fields.

I need to return a list of something like this, for each record:

{
platform_order_id: 1428478617,
order_events: [
(list of all fields of matching record 1),
(list of all fields of matching record 2)
}

Please help ๐Ÿ˜Š

2 replies