3. SELECT Basics: Read Rows Without Changing Data
3.6 Practice: First Queries on raja_coffee Orders
Why. Practice locks the SELECT pattern into muscle memory.
What. Combine column picks, aliases and LIMIT on raja_coffee orders.
How. Write three short SELECTs yourself, then match the examples.
Steps
- List five order_id values with LIMIT.
- Show city and sales_inr alias.
- List product names only.
Examples
Example 1 · dataset: raja_coffee
SELECT order_id, city, amount_inr AS sales_inr
FROM orders
LIMIT 5;Output
| order_id | city | sales_inr |
|---|---|---|
| 1001 | Pune | 840.0 |
| 1002 | Mumbai | 720.0 |
| 1003 | Goa | 890.0 |
| 1004 | Pune | 1050.0 |
| 1005 | Kolhapur | 620.0 |
Meaning. Practice set A: orders preview.
Example 2 · dataset: raja_coffee
SELECT product_name, unit_price_inr
FROM products
ORDER BY product_id;Output
| product_name | unit_price_inr |
|---|---|
| Filter Coffee 250g | 420.0 |
| Arabica Roast 500g | 890.0 |
| Cold Brew Bottle | 180.0 |
| Ceramic Mug | 350.0 |
| Chai Masala Blend | 310.0 |
Meaning. Practice set B: full product price list.
Ravindra Bagale's Tip
Save your three queries in a notes file — rebuild them tomorrow without peeking.
Ravindra Bagale's Tip – मराठी
तीन क्वेरीज नोट्समध्ये सेव्ह करा — उद्या न बघता पुन्हा लिहा.
Ravindra Bagale's Tip – हिंदी
तीन क्वेरी नोट में सेव करें — कल बिना देखे फिर लिखें।