Instructor(s): Filsan Musa, and Fadumo Diriye
This course serves as an introduction to Structured Query Language (SQL) for the aspiring data professional, focusing on fundamental concepts and practical applications. The course is divided into two parts: the first part provides a foundational understanding of RDBMS, SQL, and access to databases, whilst the second part introduces applications of the SELECT statement, various functions, clauses, and operators. The course incorporates interactive video lectures, as well as weekly course exercises to reinforce learning.
There are no required prerequisites for this course.
- 1. Week 1: Introduction to the course
- a. Access to course content
- b. Overview of material
- 2. Week 2: Understanding Databases, and SQL
- a. What is a database?
- b. Types of Data by Structure
- i. Structured
- ii. Semi-structured
- iii. Unstructured
- c. What is an RDBMS?
- d. Define SQL
- e. Understanding SQL flavours
- i. Differences between flavours
- ii. Roles of ANSI and ISO
- 3. Week 3: Relational Database Fundamentals
- a. Inside a Relational Database
- b. Tabular data storage
- c. Primary and Foreign Keys
- d. Cardinality in Relational Databases
- e. Understanding Schemas and ERDs
- 4. Week 4: Getting Started with SQL & Chinook DB
- a. Introducing the Chinook database
- b. Setting up Online SQL Account
- c. Accessing the Chinook database
- d. General IDE Overview
- d. Components of an IDE
- 5. Week 5: Defining & Identifying Data Types
- a. Data types in SQL
- i. String
- ii. Numeric
- iii. Datetime
- b. Identifying the data types
- 6. Week 6: Understanding SQL commands and components
- a. Types of SQL commands
- b. Components of a query
- i. Functions
- ii. Clauses
- iii. Operators
- c. SQL Statements and Queries
- 7. Week 7: Constructing a Select Statement
- a. Overview of Select & From clause
- b. Selecting One / Multiple / All Columns
- c. Selecting Distinct values
- d. Using aliases
- 8. Week 8: Basic Aggregation Functions
- a. Count
- b. Sum
- c. Avg
- d. Min
- e. Max
- 9. Week 9: Basic Formatting Functions, and Keywords
- a. String Functions
- i. Lower()
- ii. Upper()
- b. Numeric Functions
- i. Floor()
- ii. Round()
- c. Datetime Functions
- i. Time(), Day(), Month(), Year()
- ii. Timestamp(), Date()
- d. Datetime Keywords
- i. Current_Timestamp, Current_Time, Now()
- 10. Week 10: Limit, Order By, Group By
- a. Limit
- b. Order By
- i. Asc
- ii. Desc
- c. Group By
- 11. Week 11: Where & Having Clauses
- a. Where
- b. Having
- 12. Week 12: Arithmetic Operators
- a. Addition
- b. Subtraction
- c. Multiplication
- d. Division
- e. Modulo
- 13. Week 13: Logical & Comparison Operators
- a. Logical Operators
- i. And / Or / Between / In
- ii. Not / Is (Not) Null
- iii. Like
- b. Comparison Operators
- i. Greater (Than) / Less (Than)
- ii. Equality / Inequality
- 14. Week 14: Use cases for the Case When statement
- a. Using case when w/ logical & comparison operators
- b. Using case when w/ arithmetic operators
- 15. Week 15: Introduction to Joins
- a. Left Join
- b. Right Join
- c. Inner Join
- d. Outer Join
- 16. Week 16: Structuring a proper Query & Debugging Errors
- a. Query Order
- b. Query Format
- c. Variable naming conventions
- d. Common Errors & Debugging
- e. Reference a Database
Course Material:
https://www.youtube.com/@TheDataArchives
https://github.com/filsan-musa/Course-SQL_Fundamentals_for_Data_Analysis
Resources (Optional):
Oppel, A., & Sheldon, R. (2009). SQL A Beginner's Guide (3rd ed.). McGraw Hill. Retrieved from SQL: A Beginner's Guide
W3Schools. (n.d.). SQL Tutorial. Retrieved from W3Schools SQL Tutorial
The contents of this repository are licensed under the CC0 1.0 Universal. Please view the "LICENSE" file for further details.