Question: Run the following script to populate the table INSERT INTO dbo.Menu SELECT 'Big Mac','Hamburger',1.25,3.24,1015,5000,15853 union SELECT

  1. Run the following script to populate the table 

INSERT INTO dbo.Menu

SELECT            'Big Mac','Hamburger',1.25,3.24,1015,5000,15853

union

SELECT            'Quarter Pounder / Cheese','Hamburger',1.15,3.24,1000,4589,16095

union

SELECT            'Half Pounder / Cheese','Hamburger',1.35,3.50,500,3500,12589

union

SELECT            'Whopper','Hamburger',1.55,3.99,989,4253,13000

union

SELECT            'Kobe Cheeseburger','Hamburger',2.25,5.25,350,1500,5000

union

SELECT            'Grilled Stuffed Burrito','Burrito',.75,5.00,2000,7528,17896

union

SELECT            'Bean Burrito','Burrito',.50,1.00,1750,7000,18853

union

SELECT            '7 layer Burrito','Burrito',.78,2.50,350,1000,2563

union

SELECT            'Dorrito Burrito','Burrito',.85,1.50,600,2052,9857

union

SELECT            'Turkey and Cheese Sub','Sub Sandwich',1.75,5.50,1115,7878,16853

union

SELECT            'Philly Cheese Steak Sub','Sub Sandwich',2.50,6.00,726,2785,8000

union

SELECT            'Tuna Sub','Sub Sandwich',1.25,4.50,825,3214,13523

union

SELECT            'Meatball Sub','Sub Sandwich',1.95,6.50,987,4023,15287

union

SELECT            'Italian Sub','Sub Sandwich',2.25,7.00,625,1253,11111

union

SELECT            '3 Cheese Sub','Sub Sandwich',.25,6.00,815,3000,11853

 

  1. ItemID has a primary key with an Identity (1000,1)
  2. ItemType does not allow nulls
  3. CostToMake should always be greater than 0
  4. dbo.Menu Columns ItemID (PK, int, not null) ItemName (varchar(50), null) ItemType (varchar(50), not null) 

 

 

  1. Retrieve all Burritos and sort by Price
  2. Retrieve all items that Cost more than $1.00 to make and sort by WeeklySales
  3. What's the sum of total profit by ItemType
  4. Retrieve Total Weekly Sales by ItemType of only items with more than 3000 weekly Sales. Sort by Total Weekly Sales descending.
  5. Find out the profit made Weekly, Monthly and Yearly on Big Mac's
  6. Retrieve the ItemType has more than $20,000 in Monthly Sales
  7. Retrieve the ItemType that had the best Profit from MonthlySales

dbo.Menu Columns ? ItemID (PK, int, not null) ItemName (varchar(50), null) ItemType (varchar(50), not null) CostToMake (money, null) Price (money, null) WeeklySales (int, null) MonthlySales (int, null) YearlySales (int, null) Keys PK_Menu Constraints CK_Menu

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

It seems you are asking for SQL queries related to a database table named dboMenu based on the given script to populate the table and the structure pr... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!