Skip to content

kai2055/sql-practice

Repository files navigation

SQL Practice Repository

Systematic SQL learning through SQLBolt lessons and hands-on practice with the Chinook database.

🎯 Learning Goals

  • Master SQL fundamentals for data analysis
  • Build muscle memory through repetition
  • Create a portfolio of SQL work
  • Prepare for data engineering roles

📊 Database

Chinook Database: A sample database representing a digital music store with 11 tables including customers, invoices, tracks, artists, albums, employees, and genres.

Tables:

  • Album, Artist, Customer, Employee, Genre
  • Invoice, InvoiceLine, MediaType, Playlist
  • PlaylistTrack, Track

📚 Progress Tracker

✅ Completed

None yet - just starting!

🔄 In Progress

  • 01_select_and_filtering.ipynb - SQLBolt Ch 1-6
    • 25 practice problems
    • Topics: SELECT, WHERE, ORDER BY, LIMIT, LIKE, BETWEEN, IN
    • Status: Problems created, working through solutions

⬜ Planned

  • 02_joins.ipynb - SQLBolt Ch 7-9 (INNER/LEFT/RIGHT JOINs)
  • 03_aggregations.ipynb - GROUP BY, COUNT, SUM, AVG
  • 04_subqueries.ipynb - Nested queries, EXISTS
  • 05_advanced_queries.ipynb - CASE, UNION, CTEs
  • 06_real_world_analysis.ipynb - Business questions and analytics

🛠️ Tech Stack

  • Database: SQLite 3
  • Language: Python 3
  • Libraries: pandas, sqlite3
  • Environment: Jupyter Notebooks

📖 Learning Resources

🗂️ Repository Structure

sql-practice/
├── README.md                          # This file
├── chinook.db                         # Chinook database file
├── 01_select_and_filtering.ipynb     # SELECT, WHERE, ORDER BY practice
└── (more notebooks as I progress...)

📝 Notes

  • Each notebook contains 20-30 practice problems
  • Problems range from easy to hard difficulty
  • Self-verified solutions using multiple query approaches
  • Learning by doing, not just reading

Last Updated: January 2, 2025
Current Focus: Mastering SELECT fundamentals

About

SQL fundamentals for data analysis and engineering — SELECT through CTEs, practiced hands-on against the Chinook database, not skimmed.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors