Middle
Is it possible to combine positions into one group and output the prices as a comma-separated string instead of calculating the average?
sobes.tech AI
Answer from AI
SELECT
order_id,
STRING_AGG(CAST(price AS VARCHAR), ', ') AS prices_list
FROM
order_items
GROUP BY
order_id;