Data Analyst Career
Data Analyst เรียนคณะ วิทยาการคอมพิวเตอร์ สถิติ Data Science SQL Python Tableau Power BI Statistics Visualization Career Path เงินเดือน
| คณะ/สาขา | มหาวิทยาลัย | จุดเด่น | ทักษะที่ได้ |
|---|---|---|---|
| วิทยาการคอมพิวเตอร์ | จุฬา ธรรมศาสตร์ มหิดล | Programming แน่น | Python SQL Algorithm |
| สถิติ | จุฬา เกษตร มหิดล | Statistics แน่น | R Statistics Probability |
| Data Science | ธรรมศาสตร์ ลาดกระบัง | ตรงสาย | ML Python SQL Viz |
| วิศวกรรมคอมพิวเตอร์ | จุฬา ลาดกระบัง | System + Code | Python Database System |
| MIS/IT | ธรรมศาสตร์ เกษตร | Business + Tech | SQL BI Business |
SQL พื้นฐาน
# === SQL สำหรับ Data Analyst ===
# เชื่อมต่อ Database
# pip install sqlalchemy pandas psycopg2-binary
# import pandas as pd
# from sqlalchemy import create_engine
#
# engine = create_engine('postgresql://user:pass@localhost:5432/mydb')
# SQL Queries ที่ Data Analyst ใช้บ่อย
# 1. SELECT — ดึงข้อมูล
# SELECT
# product_name,
# category,
# price,
# quantity_sold
# FROM products
# WHERE category = 'Electronics'
# ORDER BY quantity_sold DESC
# LIMIT 10;
# 2. GROUP BY — สรุปข้อมูล
# SELECT
# category,
# COUNT(*) as total_products,
# AVG(price) as avg_price,
# SUM(revenue) as total_revenue
# FROM sales
# GROUP BY category
# HAVING SUM(revenue) > 100000
# ORDER BY total_revenue DESC;
# 3. JOIN — รวมข้อมูลหลายตาราง
# SELECT
# c.customer_name,
# COUNT(o.order_id) as total_orders,
# SUM(o.amount) as total_spent,
# AVG(o.amount) as avg_order_value
# FROM customers c
# JOIN orders o ON c.id = o.customer_id
# WHERE o.order_date >= '2025-01-01'
# GROUP BY c.customer_name
# ORDER BY total_spent DESC;
# 4. Window Functions — Advanced
# SELECT
# employee_name,
# department,
# salary,
# RANK() OVER (PARTITION BY department ORDER BY salary DESC) as rank,
# salary - AVG(salary) OVER (PARTITION BY department) as diff_from_avg
# FROM employees;
# 5. CTE — Common Table Expression
# WITH monthly_sales AS (
# SELECT
# DATE_TRUNC('month', order_date) as month,
# SUM(amount) as revenue
# FROM orders
# GROUP BY 1
# )
# SELECT
# month,
# revenue,
# LAG(revenue) OVER (ORDER BY month) as prev_month,
# (revenue - LAG(revenue) OVER (ORDER BY month)) / LAG(revenue) OVER (ORDER BY month) * 100 as growth_pct
# FROM monthly_sales;
from dataclasses import dataclass
@dataclass
class SQLSkill:
skill: str
level: str
use_case: str
frequency: str
sql_skills = [
SQLSkill("SELECT WHERE ORDER BY", "เริ่มต้น", "ดึงข้อมูลพื้นฐาน", "ทุกวัน"),
SQLSkill("GROUP BY HAVING", "เริ่มต้น", "สรุปข้อมูล Aggregate", "ทุกวัน"),
SQLSkill("JOIN (INNER LEFT)", "กลาง", "รวมข้อมูลหลายตาราง", "ทุกวัน"),
SQLSkill("Subquery CTE", "กลาง", "Query ซับซ้อน", "บ่อย"),
SQLSkill("Window Functions", "สูง", "Ranking Running Total", "บ่อย"),
SQLSkill("Date Functions", "กลาง", "Time-series Analysis", "ทุกวัน"),
]
print("=== SQL Skills for Data Analyst ===")
for s in sql_skills:
print(f" [{s.level}] {s.skill}")
print(f" Use: {s.use_case} | Frequency: {s.frequency}")
Python Data Analysis
# === Python สำหรับ Data Analyst ===
# pip install pandas numpy matplotlib seaborn jupyter
import pandas as pd
import numpy as np
# สร้างข้อมูลตัวอย่าง
np.random.seed(42)
n = 100
data = {
'date': pd.date_range('2025-01-01', periods=n, freq='D'),
'revenue': np.random.normal(50000, 10000, n).astype(int),
'orders': np.random.poisson(100, n),
'category': np.random.choice(['Electronics', 'Fashion', 'Food', 'Home'], n),
}
df = pd.DataFrame(data)
# Basic Analysis
print("=== Sales Analysis ===")
print(f" Total Revenue: {df['revenue'].sum():,.0f} THB")
print(f" Avg Daily Revenue: {df['revenue'].mean():,.0f} THB")
print(f" Total Orders: {df['orders'].sum():,}")
print(f" Avg Order Value: {df['revenue'].sum() / df['orders'].sum():,.0f} THB")
# Category Analysis
cat_summary = df.groupby('category').agg(
total_revenue=('revenue', 'sum'),
avg_revenue=('revenue', 'mean'),
total_orders=('orders', 'sum'),
).sort_values('total_revenue', ascending=False)
print(f"\n Category Summary:")
for cat, row in cat_summary.iterrows():
print(f" {cat}: Revenue {row['total_revenue']:,.0f} | Orders {row['total_orders']:,}")
# Weekly Trend
df['week'] = df['date'].dt.isocalendar().week
weekly = df.groupby('week')['revenue'].sum()
print(f"\n Weekly Revenue Trend (first 5 weeks):")
for week, rev in weekly.head().items():
bar = "#" * int(rev / 10000)
print(f" Week {week}: {rev:>10,.0f} {bar}")
Career Path
# === Data Analyst Career Path ===
@dataclass
class CareerStage:
level: str
years: str
salary_thb: str
skills: str
next_step: str
stages = [
CareerStage("Intern/Trainee", "0-1 ปี", "15,000-25,000", "SQL Excel Basic Python", "Junior Analyst"),
CareerStage("Junior Analyst", "1-2 ปี", "25,000-40,000", "SQL Python Tableau Statistics", "Mid Analyst"),
CareerStage("Mid Analyst", "2-4 ปี", "40,000-70,000", "Advanced SQL Python BI Dashboard", "Senior Analyst"),
CareerStage("Senior Analyst", "4-7 ปี", "70,000-120,000", "Strategy Stakeholder ML basics", "Lead/Manager"),
CareerStage("Lead/Manager", "7+ ปี", "100,000-180,000", "Team Management Strategy", "Director"),
]
print("=== Career Path ===")
for s in stages:
print(f" [{s.level}] {s.years}")
print(f" Salary: {s.salary_thb} THB/month")
print(f" Skills: {s.skills}")
print(f" Next: {s.next_step}")
# Alternative Paths
alt_paths = {
"Data Scientist": "เน้น ML AI Modeling เงินเดือนสูงกว่า",
"Data Engineer": "เน้น Pipeline Infrastructure ETL",
"Analytics Engineer": "เน้น dbt Data Modeling Warehouse",
"BI Developer": "เน้น Dashboard Reporting Visualization",
"Product Analyst": "เน้น Product Metrics A/B Testing",
"Marketing Analyst": "เน้น Campaign ROI Attribution",
}
print(f"\n\nAlternative Career Paths:")
for path, desc in alt_paths.items():
print(f" [{path}]: {desc}")
# Learning Resources
resources = [
"SQL: Mode Analytics SQL Tutorial (ฟรี)",
"Python: Kaggle Learn Python + Pandas (ฟรี)",
"Statistics: Khan Academy Statistics (ฟรี)",
"Tableau: Tableau Public + Free Training",
"Portfolio: Kaggle Datasets + Personal Projects",
"Certificate: Google Data Analytics Certificate",
"Practice: LeetCode SQL + HackerRank",
]
print(f"\n\nLearning Resources:")
for i, r in enumerate(resources, 1):
print(f" {i}. {r}")
เคล็ดลับ
- SQL: เรียน SQL ก่อนเลย สำคัญที่สุดสำหรับ Data Analyst
- Portfolio: ทำ Project ใน Kaggle แสดงผลงาน
- Business: เข้าใจธุรกิจสำคัญไม่แพ้ Technical Skill
- Communication: ฝึกนำเสนอ Insight ให้คนอื่นเข้าใจ
- Cert: Google Data Analytics Certificate ดีสำหรับเริ่มต้น
การบริหารจัดการฐานข้อมูลอย่างมืออาชีพ
Database Management ที่ดีเริ่มจากการออกแบบ Schema ที่เหมาะสม ใช้ Normalization ลด Data Redundancy สร้าง Index บน Column ที่ Query บ่อย วิเคราะห์ Query Plan เพื่อ Optimize Performance และทำ Regular Maintenance เช่น VACUUM สำหรับ PostgreSQL หรือ OPTIMIZE TABLE สำหรับ MySQL
เรื่อง High Availability ควรติดตั้ง Replication อย่างน้อย 1 Replica สำหรับ Read Scaling และ Disaster Recovery ใช้ Connection Pooling เช่น PgBouncer หรือ ProxySQL ลดภาระ Connection ที่เปิดพร้อมกัน และตั้ง Automated Failover ให้ระบบสลับไป Replica อัตโนมัติเมื่อ Primary ล่ม
Backup ต้องทำทั้ง Full Backup รายวัน และ Incremental Backup ทุก 1-4 ชั่วโมง เก็บ Binary Log หรือ WAL สำหรับ Point-in-Time Recovery ทดสอบ Restore เป็นประจำ และเก็บ Backup ไว้ Off-site ด้วยเสมอ
Data Analyst เรียนคณะอะไรดี
วิทยาการคอมพิวเตอร์ สถิติ คณิตศาสตร์ Data Science วิศวกรรม MIS เศรษฐศาสตร์ จุฬา ธรรมศาสตร์ มหิดล เกษตร ลาดกระบัง SQL Python Statistics
Data Analyst ต้องมีทักษะอะไรบ้าง
SQL สำคัญสุด Python R Excel Statistics Visualization Tableau Power BI Communication Business Understanding Critical Thinking
เครื่องมือ Data Analyst มีอะไรบ้าง
SQL MySQL PostgreSQL BigQuery Python pandas numpy matplotlib Jupyter Excel Tableau Power BI Looker Git Airflow dbt Google Analytics
เงินเดือน Data Analyst เท่าไหร่
Junior 25,000-40,000 Mid 40,000-70,000 Senior 70,000-120,000 Lead 100,000-180,000 Freelance 500-2,000/hr Data Scientist Data Engineer สูงกว่า
สรุป
Data Analyst เรียนคณะ วิทยาการคอมพิวเตอร์ สถิติ Data Science SQL Python Tableau Power BI Statistics Career Path เงินเดือน Portfolio Kaggle Google Certificate
