From fa4e5648ab3a329a1b0186e00f42ec92fb3fc93e Mon Sep 17 00:00:00 2001 From: DigitAll-U <145283820+DigitAll-U@users.noreply.github.com> Date: Sat, 25 Oct 2025 00:30:07 +0500 Subject: [PATCH] Add SQL query for online shop order details Add SQL query to retrieve order details with customer and product names. --- 4-multiple-tables/27_online_shop.sql | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/4-multiple-tables/27_online_shop.sql b/4-multiple-tables/27_online_shop.sql index 46d5457..be219aa 100644 --- a/4-multiple-tables/27_online_shop.sql +++ b/4-multiple-tables/27_online_shop.sql @@ -1,4 +1,7 @@ --- Online Shop 🛍️ --- Codédex - --- No solution for this one yet! :) \ No newline at end of file +SELECT + orders.id, orders.date, customers.name, products.name +FROM orders + JOIN customers ON orders.customer_id = customers.id + JOIN products ON orders.item_id = products.id +ORDER BY + orders.date;