Ravindra BagaleCourses & study guides Track your progress

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

  1. List five order_id values with LIMIT.
  2. Show city and sales_inr alias.
  3. 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_idcitysales_inr
1001Pune840.0
1002Mumbai720.0
1003Goa890.0
1004Pune1050.0
1005Kolhapur620.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_nameunit_price_inr
Filter Coffee 250g420.0
Arabica Roast 500g890.0
Cold Brew Bottle180.0
Ceramic Mug350.0
Chai Masala Blend310.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.