Easy SELECT & filtering Free

SQL interview question: Filter a Price Range With BETWEEN

Mid-Range Product Filter

Sales wants to promote mid-tier products priced between $50 and $200.

Find all products with prices in the $50-$200 range (inclusive).

Return product_id, product_name, and price. Order by price.

Skills: BETWEEN operator for range filtering

Tables

products 20 rows
  • product_id integer PK
  • product_name text
  • category text
  • price real
  • rating real
product_idproduct_namecategorypricerating
1MacBook ProElectronics1999.994.8
2iPad AirElectronics599.994.8
3AirPods ProElectronics249.994.7

Keep going