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.

Any row order

PostgreSQLv16

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid