Add sales report scripts and results

This commit is contained in:
2024-11-17 14:47:44 +01:00
parent 70f6458e03
commit aac9358de5
4 changed files with 113 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
-- sales report - task 3
-- changes:
-- replaced menu name with menu item name, because I assumed that Little lemon wants orders à la carte
-- instead of fixed menus
select
MI.Name,
count(OI.OrderItemID) as OrderQuantity
from MenuItems as MI
inner join OrderItems as OI on MI.MenuItemID = OI.MenuItemID
group by OI.MenuItemID
having OrderQuantity > 2;