The SQL 101 course is designed for someone aspiring to build a career as data engineer, analyst, or a data scientist. This course covers fundamental SQL concepts, including querying, database design, and data manipulation. learning to extract insights and support data-driven decision-making.
By the end of the course, you will be writing complex queries, optimizing database performance, and using SQL to solve practical problems.
You may also use any other database engine you feel comfortable with however the create database statement may need to be adjusted. It maybe also be that some functions are not in your chosen engine or are named differently.
To participate please fork the repo and follow one of the setup documents. please save your queries here. Also while going through the corse if you find an issue or think of an improvement please log an issue here
Grades have been added to help break your journy into helpful sections. Each section will cover different skill levels and will help you demonstrate your ability to other people.
- Overview of SQL: What is SQL and its importance.
- Relational Databases: Basic concepts of relational databases, tables, rows, and columns.
- Simple Queries: Using
SELECTto retrieve data from a single table. - Filtering Data: Using
WHEREclause to filter results.
- Sorting Data: Using
ORDER BYto sort query results.
- Limiting Results: Using
LIMIT(orTOPin some SQL dialects) to restrict the number of returned rows. - Basic Functions: Introduction to SQL functions like
COUNT,SUM,AVG,MIN, andMAX. - Aliasing: Using
ASto rename columns in the result set.
- Joins: Understanding and using different types of joins (
INNER JOIN,LEFT JOIN,RIGHT JOIN,FULL JOIN).
- Aggregate Functions: Grouping data with
GROUP BYand filtering groups withHAVING. - Subqueries: Writing and using subqueries in
SELECT,FROM,WHERE, andHAVINGclauses. - Set Operations: Using
UNION,INTERSECT, andEXCEPT.
- Inserting Data: Using
INSERTto add new records to a table.
- Updating Data: Using
UPDATEto modify existing records. - Deleting Data: Using
DELETEto remove records.
- Creating Tables: Using
CREATE TABLEto define new tables.
- Altering Tables: Using
ALTER TABLEto modify existing tables (e.g., adding, dropping columns). - Dropping Tables: Using
DROP TABLEto delete tables. - Constraints: Understanding and implementing primary keys, foreign keys, unique constraints, and check constraints.
- String Functions: Using functions like
CONCAT,SUBSTRING,LENGTH,TRIM, etc.
- Date and Time Functions: Using functions like
NOW,DATEADD,DATEDIFF,FORMAT, etc. - Mathematical Functions: Using functions like
ROUND,ABS,CEIL,FLOOR, etc. - Case Statements: Using
CASEfor conditional logic within queries.
- Indexes: Understanding the importance of indexes and how to create them.
- Query Optermization: Tips and techniques for writing efficient queries.
- Execution Plans: Reading and interpreting execution plans to optimize query performance.
- Temporary Tables and CTEs: Using temporary tables and Common Table Expressions (CTEs) to simplify complex queries.
- Transactions: Using
BEGIN TRANSACTION,COMMIT, andROLLBACKto manage transactions.
- Locking and Concurrency: Understanding locking mechanisms and how to handle concurrency.
- Windows Functions: Using
ROWNUMBER,RANK, andNTILE.
In this section we will cover technoligy specific topics such as reading CSVs in DuckDB and variable in SQL Server (TSQL).
- Cursors: Using
CURSORin SQL Server to loop through data.