Products per Order as a List
Return each order id with its products joined into one comma-separated string in alphabetical order. Order by order id.
Table schema
OrderItems(order_id INT, product VARCHAR(10))Sample data
order_id | product
1 | Pen
1 | Book
2 | Bag
2 | Pen
2 | Cap
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.