Question: Math with SQL - Exercise #3 query.sql = The Situation: 1 select * From retail.inventory 2 A member of the Merchandising team for Monday Boots

Math with SQL - Exercise #3 query.sql = The

Math with SQL - Exercise #3 query.sql = The Situation: 1 select * From retail.inventory 2 A member of the Merchandising team for Monday Boots is expecting a shipment of additional items for one specific product. She wants to see what percentage of the future inventory level for that product is currently in stock. The current level of inventory is represented in the retail.inventory table by the total_on_hand column, while the number of items included in upcoming shipments is represented by the total_on_order column. Combining those two columns would give you the future inventory level. Task Using the retail.inventory table, pull the current stock percentage out of the future stock level for the product with a product_id = 21. 9 SQL Viewer + inventory_id product_id created_at last_updated_at total_on_hand total_on_order 1 1 2016-09-12 00:00:00 2018-02-06 00:00:00 26 24 Want a hint? The percentage can be calculated by dividing the current inventory level by the current inventory level plus the total number of items shipping in the future. Remember your math and the order of operations. 2 2 2016-09-12 00:00:00 2018-02-25 00:00:00 22 5 3 3 2016-09-12 00:00:00 2018-02-19 00:00:00 4 16 4 4 2016-09-12 00:00:00 2018-02-18 00:00:00 1 36 Want another hint? You will need to multiply one of the fields in your calculation by 1.00 to allow there to be decimal values in your answer. Try running your query without doing so to see what result you get. 5 5 2016-09-12 00:00:00 2018-02-11 00:00:00 28 8 6 6 2016-09-12 00:00:00 2018-02-09 00:00:00 1 12 7 7 2016-09-12 00:00:00 2018-02-11 00:00:00 17 6 5/5 sql101 1 Run

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 General Management Questions!