Skip to content
Advertisement

Add additional column to the query output

I have the following query that is grabbing data from a table and combining all the products into one column and counting the quantity of that order.

I need to add an additional column to the output though, how can I also add ship_date?

This is how the original table is laid out:

l

And this is how the query outputs the results:

enter image description here

How can I add ship_date to that output?

Advertisement

Answer

It looks like ship_date is fixed for each and every order_id. If so, you can just add it to the inner and outer aggregation:

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement