6-Day SQL Study Plan (MySQL) for Data Analysts →
Data Scientists
Overview: SQL remains fundamental for data roles: “Learning SQL is essential for anyone working with
databases or interested in data management” 1 , and Data Analysts/Scientists “heavily rely on SQL… as it
is an integral part of day-to-day responsibilities” 2 . This 6-day plan uses MySQL on Windows (VS Code +
Jupyter/Anaconda). Each day covers key topics with practice, datasets, and resources. Commit your progress
each day to GitHub (in the README) and consider sharing brief LinkedIn posts (examples below) to build
your portfolio.
Day 1: Setup & Basic Queries (SELECT, WHERE)
• Environment Setup: Install MySQL Community Server and MySQL Workbench. In Anaconda
(VS Code), create a Python env and pip install mysql-connector-python (or use conda
install mysql-connector-python ). This allows Jupyter notebooks to connect to MySQL (e.g.
[Link](user, host, database) 3 ).
• SELECT & WHERE: Learn to retrieve and filter data. The SELECT statement retrieves data and is
the most common SQL command 4 . The WHERE clause filters rows by condition 5 . For
example, SELECT name, salary FROM employees WHERE salary > 50000; selects all
employees earning over 50K. Practice on a simple single-table dataset (e.g. Kaggle “Employees” or
CSV loaded into MySQL) to write basic queries.
• Exercises: Use online tutorials (W3Schools’ Tryit SQL, Mode or DataLemur SQL lessons,
freeCodeCamp’s SQL YouTube) to practice SELECT/WHERE queries. Try SQLZoo’s “SELECT” lessons.
Example tasks:
• Retrieve subsets of rows (e.g. “names of employees in Sales department” or “customers older than
30”).
• Apply multiple conditions with AND / OR .
• Resources: See W3Schools SQL, Mode Analytics SQL tutorials, or YouTube (e.g. freeCodeCamp’s full
SQL course 6 ).
• GitHub: Commit Day1 queries/script; in README write e.g. “Day 1: practiced SELECT and WHERE
queries on MySQL”.
• LinkedIn (optional): e.g. “Day 1: Kicked off my SQL journey – ran my first MySQL queries using SELECT
and WHERE to filter data! #SQL #DataAnalytics”.
Day 2: JOINs (Combining Tables)
• JOIN Basics: Learn to combine data from multiple tables. The JOIN clause merges rows from two
tables on a matching key 7 . Review INNER JOIN, LEFT/RIGHT/FULL OUTER JOIN (inner returns only
matching rows, outer returns all from one side). For example, joining an employees table with a
departments table on department IDs (see example below). Understanding JOINs is as
foundational as SELECT/WHERE 8 .
1
• Practice: Use MySQL’s Sakila or Chinook sample database (or create two small tables) and write JOIN
queries. Exercises:
• Inner join: List all customers with their country names by joining Customers→Countries.
• Left join: Show all products and their orders, including products with no orders.
• Multi-table joins: Query involving 3+ tables (using aliases).
• Resources: Tutorials like Mode Analytics “SQL JOINs” lesson or DataLemur’s “SQL JOINS” (Lesson 211
9 ) explain join types. YouTube channels (Traversy Media, Mosh, etc.) have clear examples.
• GitHub: README update, e.g. “Day 2: practiced INNER/LEFT JOINS on tables (employees–departments) in
MySQL”.
• LinkedIn: e.g. “Day 2: Learned to join tables in SQL – combined employee and department data to answer
business questions. #DataScience #SQL”.
Day 3: Aggregation & Grouping ( GROUP BY , HAVING , aggregates)
• GROUP BY & Aggregates: Learn aggregate functions (COUNT, SUM, AVG, MAX, MIN) and grouping.
The GROUP BY clause groups rows by column values to produce summary rows 10 , often with
aggregates. (E.g. “find total sales by region” groups by region and uses SUM.) The HAVING clause
filters groups (like WHERE but after grouping). DISTINCT removes duplicates.
• Practice: Work with a slightly larger dataset (e.g. sales or orders data). Exercises:
• Compute summary stats: e.g. “Average salary per department” ( GROUP BY department ).
• Filtered aggregation: e.g. “Count of orders per customer having more than 5 orders” (use HAVING
COUNT(*) > 5 ).
• DISTINCT: list unique values, e.g. distinct product categories.
• Resources: W3Schools and Mode Analytics (“Group By”, “HAVING” tutorials) are useful. DataLemur’s
“SQL GROUP BY” (Lesson 203) covers these topics. For practice problems, consider SQLZoo “SELECT
from WORLD” or Mode’s question library.
• GitHub: “Day 3: practiced aggregation and GROUP BY on sales data” in README.
• LinkedIn: e.g. “Day 3: Mastered SQL GROUP BY and aggregate functions – summarized data by category
and calculated totals. #SQL #Analytics”.
Day 4: Subqueries, CTEs, and CASE/WHEN
• Subqueries & CTEs: Learn advanced query structuring. A subquery is a SELECT inside another
query; a CTE (Common Table Expression, using WITH ) is a named temporary result set for
readability. These help break down complex problems 11 . For example, use a subquery or CTE to
first find top customers, then join/filter on that result.
• CASE/WHEN: Learn SQL’s conditional logic. CASE WHEN … THEN … ELSE … END lets you
transform values or create bins. (E.g. categorize sales into “High/Medium/Low” segments.)
• Practice:
• Write subqueries: e.g. “Find products whose sales are above the average sales” (subquery to compute
overall average).
• Use CTEs: e.g. break one complex query into steps (first CTE: total sales by region; second: sales rank
by region).
• CASE: e.g. “Label students as Pass/Fail based on grades.”
• Resources: Mode Analytics and DataLemur tutorials cover CTE vs subquery (Lesson 302 12 ) and
CASE (Lesson 210 13 ). GeeksforGeeks has examples of CASE/WHEN.
• GitHub: “Day 4: used subqueries, CTEs, and CASE in my queries.”
2
• LinkedIn: e.g. “Day 4: Tackled complex SQL with subqueries and CTEs for modular queries, plus started
using CASE logic to categorize data. #SQL #DataScience”.
Day 5: Window Functions & Advanced Queries
• Window Functions: Learn functions like ROW_NUMBER(), RANK(), SUM() OVER(PARTITION BY
…) , which perform calculations over a “window” of rows related to each row. Unlike GROUP BY,
window functions do not collapse rows 14 . They are powerful for running totals, moving averages,
ranking, etc.
• Practice: Using a time-series or ranking context (e.g. sales by date or employee salary ranks), try:
• Running total: SUM(sales) OVER (ORDER BY date) .
• Rankings: RANK() OVER (PARTITION BY region ORDER BY sales DESC) .
• Lead/Lag: compare a row’s value with the previous row.
• Resources: GeeksforGeeks has a tutorial on window functions 14 . Mode Analytics “SQL Window
Functions” lesson is very thorough. DataLemur’s “SQL WINDOW FUNCTION” (Lesson 303 12 ) is free
and interactive.
• Advanced Joins/Unions: You may also practice SELF-JOINs and UNION as additional advanced
techniques.
• GitHub: “Day 5: learned window functions (ROW_NUMBER, RANK, etc.) and applied them to rank and
aggregate data.”
• LinkedIn: e.g. “Day 5: Explored SQL window functions – calculated running totals and rankings across
partitions. Feeling more powerful in SQL! #SQL #Analytics”.
Day 6: Data Cleaning in SQL & Final Mini-Project (Python
Integration)
• String/Value Cleaning: Use SQL functions to clean data. For example, TRIM() removes unwanted
characters from string ends 15 (e.g. remove spaces or punctuation); UPPER()/LOWER() fix casing;
REPLACE() can substitute substrings. Use COALESCE() to handle NULLs. These built‑ins help
prepare data for analysis.
• Duplicates & Errors: Remove or flag duplicates (e.g. via SELECT DISTINCT or better,
ROW_NUMBER() OVER (PARTITION BY key ORDER BY date DESC) = 1 to keep latest record
16 ). Correct inconsistent entries (e.g. combine “N/A” vs “Not Applicable” with CASE/NULL ).
• Practice: Take a dirty dataset (for example, CSV of customer records with typos and blanks) loaded
into MySQL. Write SQL updates/queries to trim whitespace, standardize text, and remove duplicate
entries.
• SQL + Python Integration: In a Jupyter notebook, connect to your MySQL DB using Python ( mysql-
connector-python or sqlalchemy ). Verify queries return data (e.g.
pd.read_sql_query("SELECT ...", conn) ). Optionally use SQLAlchemy ORM for complex
apps 17 . This prepares you for combining SQL and Pandas in data projects.
• Final Mini-Project: Build a simple analysis project using a real dataset. Example: Load a public
dataset (e.g. the Walmart Sales Kaggle dataset 18 or a CSV of sales/customers) into MySQL. Write
queries to answer questions (e.g. which product line had highest sales, trends over months, etc.)
using everything you’ve learned (joins, aggregation, windows, cleaning). Document your SQL code
and results in Jupyter.
3
• Resources: ProjectPro lists sample SQL project ideas. Kaggle’s guided SQL projects provide
structured practice. Revisit any needed tutorials (Datacamp’s free SQL sections, Mode cleaning
lessons). For Python, see MySQL Connector/Python docs 3 and SQLAlchemy tutorials.
• GitHub: Final day update with mini-project summary. “Day 6: completed mini-project analyzing sales
data with MySQL + Python. Practiced cleaning data and advanced queries.”
• LinkedIn: e.g. “Day 6: Wrapped up a SQL mini-project using MySQL + Python – cleaned data, ran complex
analytics queries, and visualized insights. #DataScience #SQL”.
Resources (free & paid)
Resource Type Notes (links/examples)
Free Websites/Courses:
Interactive SQL lessons (incl. SELECT, JOIN,
– DataLemur SQL Tutorial Free (web)
CTEs)
Business-focused SQL lessons (including
– Mode Analytics SQL Tutorial Free (web)
cleaning and windows)
– Kaggle “Intro to SQL” Free (web) Guided SQL practice notebooks
– W3Schools SQL Tutorial Free (web) Reference and TryIt editor for SQL basics
– SQLZoo Free (web) Interactive SQL exercises at varying levels
Full SQL/Database course (MySQL examples)
– freeCodeCamp (YouTube) Free (video)
6
– Corey Schafer, Traversy, etc. Clear SQL/MySQL tutorials by independent
Free (video)
(YouTube) educators
Paid/Affordable:
– Udemy “MySQL Bootcamp” (C. R.
~$10-$20 Comprehensive MySQL course (often on sale)
Davis)
Courses on advanced SQL, tuning, and
– LinkedIn Learning (SQL courses) Subscription
databases
– Books (e.g. “SQL for Data Covers SQL techniques for analytics (optional
$30-$50 book
Scientists” by Teate) deep dive)
Free audit/ University-level SQL course oriented to data
– Coursera “SQL for Data Science”
Pay science
Sample GitHub README entry:
Day 3: Completed aggregation practice with GROUP BY. Calculated total sales per
region and filtered high-performing regions.
4
Sample LinkedIn Post:
“ Day 3 of my #SQL learning journey: mastered GROUP BY and aggregate functions in
MySQL! Built summary reports on sales data and caught up on SQL tutorials. Learning by
doing is key. #DataAnalysis #DataScience”
Each day’s commitment and visible progress (GitHub commits, LinkedIn updates) helps build your portfolio
and signals ongoing skill development 2 1 .
Sources: The above plan and recommendations are based on SQL tutorials and expert guides 4 10 11
14 16 and reflect current best practices for data analyst skill-building. Each cited source provides in-depth
coverage of the SQL concepts mentioned.
1 6 devtodev | 10 Best YouTube Channels to Learn SQL
[Link]
2 18 25+ SQL Projects Ideas for Data Analysis to Practice in 2025
[Link]
3 MySQL :: MySQL Connector/Python Developer Guide :: 5.1 Connecting to MySQL Using Connector/
Python
[Link]
4 5 7 8 SELECT, WHERE, JOIN — A Beginner’s Guide | by Zain khan | Medium
[Link]
9 12 13 Free SQL Tutorial for Data Analysts & Data Scientists
[Link]
10 SQL GROUP BY Statement
[Link]
11 Advanced SQL for Data Analysis —Part 1: Subqueries and CTE | Towards AI
[Link]
14 Window Functions in SQL - GeeksforGeeks
[Link]
15 Using SQL String Functions to Clean Data | Advanced SQL - Mode
[Link]
16 The Ultimate Guide to Data Cleaning in SQL | Acho
[Link]
17 Using MySQL with SQLAlchemy: Hands-on Examples — PlanetScale
[Link]