29. SQL for Excel Users (Term Map + Side-by-Side)
29.5 Practice: Same Questions in Excel and SQLite
Why. Same question in both tools proves you understood the map.
What. Practice twin tasks: filter sum, pivot by city, IF size label.
How. Do SQL here; optionally recreate in Excel on the CSV export.
Steps
- Pune sales SUM.
- Sales by city.
- Size CASE labels.
Examples
Example 1 · dataset: raja_coffee
SELECT ROUND(SUM(amount_inr),2) FROM orders WHERE city='Pune';Output
| ROUND(SUM(amount_inr),2) |
|---|
| 9170.0 |
Meaning. Twin A: filtered sum.
Example 2 · dataset: raja_coffee
SELECT city, ROUND(SUM(amount_inr),2) AS sales_inr FROM orders GROUP BY city;Output
| city | sales_inr |
|---|---|
| Goa | 1600.0 |
| Kolhapur | 2410.0 |
| Mumbai | 2490.0 |
| Nashik | 2320.0 |
| Pune | 9170.0 |
| Solapur | 730.0 |
Meaning. Twin B: pivot.
Ravindra Bagale's Tip
Download orders.csv from datasets if you want the Excel side-by-side.
Ravindra Bagale's Tip – मराठी
Excel side-by-side साठी datasets मधून orders.csv डाउनलोड करा.
Ravindra Bagale's Tip – हिंदी
Excel साइड-बाय-साइड के लिए datasets से orders.csv डाउनलोड करें।