セクション 1. 章 14
single
Challenge: Calculate Discounted Prices
メニューを表示するにはスワイプしてください
タスク
スワイプしてコーディングを開始
Write a query to calculate the discounted price for each product. The discounted price should be the original price minus the discount, rounded to two decimal places.
- Select the columns
product_id,name,price, anddiscountfrom theproductstable. - Calculate the discounted price as
price - discountfor each product. - Round the discounted price to two decimal places.
- Include the calculated value as a column named
discounted_pricein the result set. - Return one row for each product.
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 1. 章 14
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください