Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Отримання Категорії за Ціною Продукту | Об'єднання Таблиць
Розширений Рівень SQL

bookОтримання Категорії за Ціною Продукту

Чудово, ми отримали кількість товарів у кожній категорії. Тепер нам потрібно визначити категорії, де ціна товарів перевищує певну суму грошей.

Лише нагадування, що ми працюємо з двома таблицями.

product:

Завдання

Swipe to start coding

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.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 3. Розділ 2
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Suggested prompts:

What is the specific amount of money to use as the threshold?

Can you show me how to filter the categories based on product price?

Which data source or table should I use to retrieve the product prices?

close

Awesome!

Completion rate improved to 4

bookОтримання Категорії за Ціною Продукту

Свайпніть щоб показати меню

Чудово, ми отримали кількість товарів у кожній категорії. Тепер нам потрібно визначити категорії, де ціна товарів перевищує певну суму грошей.

Лише нагадування, що ми працюємо з двома таблицями.

product:

Завдання

Swipe to start coding

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.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

close

Awesome!

Completion rate improved to 4
Секція 3. Розділ 2
single

single

some-alt