Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Challenge: Get Category By Product Price | Section
Intermediate SQL
セクション 1.  16
single

single

bookChallenge: Get Category By Product Price

メニューを表示するにはスワイプしてください

We have obtained the quantity of products in each category. Now, the company tasked us to retrieve the categories where the products cost more than a certain amount of money, so they can put a discount on them.

タスク

スワイプしてコーディングを開始

Your task is to retrieve the unique category names that have products with a price higher than 450. Use the WHERE clause for this, where you compare 450 with the value of the price column.

There should be only one column in the output - category.name. You do not include the price column in the SELECT section; you only use it in the WHERE section.

Brief Instructions

  • Retrieve the category.name column from the category table.
  • Use DISTINCT to get only unique values.
  • Join the product table using a JOIN statement.
  • The common column for both tables is category.id = product.category_id.
  • Use a WHERE clause with the condition price > 450.
  • Do not use aliases in this task.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 1.  16
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt