Task
ShopKart wants a simple report of products that are currently active and priced above a threshold. Write a SQL query to return the product name, category, and price for active products with a price greater than 50.
Requirements
- Return only rows where
status = 'active' and price > 50
- Show
product_name, category, and price
- Order the result by
price in descending order
Table Definition
products
| Column | Type | Description |
|---|
| product_id | INT | Primary key for each product |
| product_name | VARCHAR(100) | Product name |
| category | VARCHAR(50) | Product category |
| price | DECIMAL(10,2) | Product price |
| status | VARCHAR(20) | Product status such as active or discontinued |
Sample Data
| product_id | product_name | category | price | status |
|---|
| 1 | Wireless Mouse | Electronics | 25.99 | active |
| 2 | Office Chair | Furniture | 120.00 | active |
| 3 | Notebook Set | Stationery | 15.50 | discontinued |
| 4 | Desk Lamp | Furniture | 55.00 | active |
| 5 | Water Bottle | Kitchen | 18.00 | active |
| 6 | Bluetooth Speaker | Electronics | 75.00 | active |
Expected Output
| product_name | category | price |
|---|
| Office Chair | Furniture | 120.00 |
| Bluetooth Speaker | Electronics | 75.00 |
| Desk Lamp | Furniture | 55.00 |