Kotomarket showcase: three categories with IN
Kotomarket showcase: three categories with IN
The Kotomarket catalogue has a single flat table products with columns id, name, category, and price (in rubles).
A manager is building a "For cat and owner" showcase and wants to display only products from three categories: корм (food), игрушки (toys), and лежанки (beds).
Write a query that returns the columns name, category, and price only for products whose category is in that list of three values. All other categories must be excluded.
Hint: it is cleanest to list the categories in a single IN (...) clause rather than chaining three OR conditions.
Lesson limits: only SELECT and WHERE. No ORDER BY, no aggregates, JOIN, DISTINCT, CASE, or subqueries. Row order does not matter.
Exemplo de resposta esperada
É assim que se parece uma resposta correta: ela tem seu próprio número de linhas e não precisa coincidir com as tabelas do esquema. Sua resposta precisa retornar os mesmos nomes de colunas do exemplo: use AS para renomeá-las se for preciso.
| name | category | price |
|---|---|---|
| Сухой корм Acana 2кг | корм | 2890.00 |
| Паучи с курицей 12шт | корм | 640.00 |
| Дразнилка-удочка | игрушки | 320.00 |
Entre para ver seu histórico de envios
EntrarEntre para usar o AI Mentor
Entrar