SQL for Data & AI
Master SQL — the universal language for querying, transforming, and engineering data that powers AI systems. SQL is the single most important non-Python skill for data scientists and ML engineers.
Level: Beginner · Category: Data Engineering · Estimated time: 14 hours
Lessons
- SQL Foundations & Relational DBs — Tables, schemas, primary keys, SELECT, FROM, WHERE — the building blocks of every SQL query.
- Filtering, Sorting & Aggregations — Powerful filtering with AND/OR/IN/LIKE, ORDER BY, GROUP BY, HAVING, and aggregate functions.
- Joins, Subqueries & CTEs — Combining tables with INNER/LEFT/FULL JOINs, nested queries, and readable CTEs for complex logic.
- Window Functions & Analytical SQL — ROW_NUMBER, RANK, LAG/LEAD, running totals — the SQL superpower for time-series and ranking tasks.
- SQL for ML Feature Engineering — Building training datasets, time-based features, aggregation features, and preventing data leakage.
- Python + SQL Integration — Connecting to databases with SQLAlchemy, running queries from pandas, and building reproducible data pipelines.
- Vector DBs & Semantic Search — How vector databases extend SQL concepts to AI — embeddings, similarity search, and pgvector.
Topics covered
sql, databases, data-engineering, analytics, postgresql, python, feature-engineering