Ravindra BagaleCourses & study guides Track your progress

1. What Is SQL and Why Analysts Need It

1.1 What Is SQL in Simple Words (Ask Questions of Tables)

Why. Managers ask questions. Tables hold answers. You need a clear way to ask.

What. SQL (Structured Query Language) is the language you use to ask a database for rows that match your question.

How. Think: table = sheet, row = one record, column = one field. SELECT asks for columns; WHERE keeps matching rows.

Steps

  1. Open the raja_coffee practice database.
  2. Look at the orders table — each row is one order.
  3. Ask: Show me city and amount for a few orders.

Examples

Example 1 · dataset: raja_coffee

SELECT city, amount_inr
FROM orders
LIMIT 5;

Output

cityamount_inr
Pune840.0
Mumbai720.0
Goa890.0
Pune1050.0
Kolhapur620.0

Meaning. Five sample rows: city and order amount in INR.

Ravindra Bagale's Tip

SQL does not change your data when you only SELECT. Practise freely.