1️⃣ What is Data Analytics?
👉 Data Analytics = Turning raw data into useful insights for decision-making.
-
Data = raw facts (e.g., daily cab fares, student marks).
-
Analytics = finding patterns & answers from data.
-
Purpose = make better business decisions.
Example:
Chai stall daily cups sold →
-
Find busiest day?
-
Do weekends sell more?
-
Should I buy extra milk on Fridays?
2️⃣ Types of Data Analytics
-
Descriptive → What happened? (e.g., Total sales this month)
-
Diagnostic → Why did it happen? (e.g., Sales dropped on holidays)
-
Predictive → What might happen? (e.g., Diwali sales forecast)
-
Prescriptive → What should we do? (e.g., Add more staff on weekends)
3️⃣ Role of a Data Analyst
A Data Analyst is a translator between data & business.
Main tasks:
-
Collect data (Excel, SQL, Surveys).
-
Clean data (remove errors, duplicates, missing).
-
Analyze data (formulas, queries, stats).
-
Visualize (charts, dashboards).
-
Share insights in plain language.
Example (Swiggy):
-
Data: Orders from cities.
-
Insight: “Hyderabad = top biryani city.”
-
Action: Add more delivery partners in Hyderabad weekends.
4️⃣ Data Cleaning Basics
👉 Rule: Clean first, analyze later (“Garbage In → Garbage Out”).
Steps:
-
Spelling errors (Prodct A → Product A).
-
Missing values (replace with 0 or average).
-
Outliers (Sales = -50, Sales = 100000 → check business meaning).
-
Consistency (dates, formats, spaces).
✅ Don’t delete strange values blindly → understand the business (e.g., negative = refunds).
5️⃣ Descriptive Analytics (Basics)
Answers “What happened?”
Techniques:
-
Total (SUM)
-
Average (AVG)
-
Max/Min
-
Count
-
Percentages / Growth
Example:
Date | Product | Sales |
---|---|---|
01-08 | A | 100 |
02-08 | A | 0 |
03-08 | B | 200 |
04-08 | A | 1000 |
05-08 | C | 150 |
-
Total sales = 1450
-
Avg sales/day = 290
-
Highest sale = 1000
-
Lowest sale = 0
6️⃣ SQL Basics (Setup)
Why SQL? Works on millions of rows, much faster than Excel.
Setup (beginner):
-
Install DB Browser for SQLite.
-
Create database
learn_sql.sqlite
. -
Create table:
CREATE TABLE sales (
id INTEGER PRIMARY KEY,
sales_date TEXT,
product TEXT,
amount INTEGER
);
Insert sample data:
INSERT INTO sales (sales_date, product, amount) VALUES
('2025-08-01','Product A',100),
('2025-08-02','Product A',0),
('2025-08-03','Product B',200),
('2025-08-04','Product A',1000),
('2025-08-05','Product C',150);
7️⃣ SQL vs Excel (Formula Mapping)
Task | Excel | SQL |
---|---|---|
Show all data | (view sheet) | SELECT * FROM sales; |
Sum | =SUM(C2:C100) |
SELECT SUM(amount) FROM sales; |
Average | =AVERAGE(C2:C100) |
SELECT AVG(amount) FROM sales; |
Max/Min | =MAX(C:C) , =MIN(C:C) |
SELECT MAX(amount), MIN(amount) FROM sales; |
Count rows | =COUNTA(C:C) |
SELECT COUNT(*) FROM sales; |
Count > 500 | =COUNTIF(C:C,">500") |
|