Challenge 1 Part 2 Eilf B 1 00 For Each Of The Next Parts Of This Challenge Add A New Column Onto Your Query Fro 1 (70.1 KiB) Viewed 55 times
Challenge #1 - Part 2 = ☺ Eilf B 1.00 For each of the next parts of this Challenge, add a new column onto your query from Step 1. query.sql X + 1 SELECT product_id, 2 sku, 3 original_price, 4 current_price, 5 CASE WHEN current_price < original_price 6 THEN '1' ELSE 'O' END on_markdown 7 FROM retail.products 8 WHERE current_price < original_price 9 Add discount amount 10 where (original_price-current_price)= discount_amount; Task 0.00 out 10.00 Pull the dollar amount that is being discounted for each of the products that are currently on markdown. Add this new column onto the end of your results and call it discount_amount. SQL Viewer + O Click the checkbox above to attempt this task. ERROR: syntax error at or near "Add" LINE 9: Add discount_amount Checks SOL Databaco Tect . Inramnlata 03 2/5 sql101 D Run
m query.sql X + Challenge #1 - Part 2 0.00 out of 10.00 sam Ĉ Eiff Pull the dollar amount that is being discounted for each of the products that are currently on markdown. Add this new column onto the end of your results and call it discount_amount. 1 SELECT product_id, 2 sku, 3 original_price, 4 current_price, 5 CASE WHEN current_price < original_price 6 THEN '1' ELSE 'O' END on_markdown 7 FROM retail products 8 WHERE current_price < original_price 9 Add discount amount 10 where (original_price-current_price) - discount_amount; A-Z . Click the checkbox above to attempt this task. Checks > SQL Database Test Incomplete Part 2 9 SQL Viewer + bong ERROR: syntax error at or near "Add" LINE 9: Add discount_amount Want a hint? • The discount amount is equivalent to the original price minus the current price. 2/5 > sql101 D Run
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!