SQL for Data Analysis

SQL (Structured Query Language) is the standard programming language used to manage and query data stored in relational databases. For data analysis, it is an essential tool for retrieving, filtering, joining, and aggregating vast amounts of data to uncover insights and answer business questions. Analysts use SQL to perform fundamental tasks such as calculating key performance metrics, segmenting customers, identifying trends, and preparing clean, structured datasets for further exploration in statistical software or visualization tools. As the primary interface to most of the world's structured data, proficiency in SQL is a foundational skill for data analysts, data scientists, and business intelligence professionals, enabling them to directly access and manipulate the raw information that powers decision-making.

  1. Introduction to SQL and Relational Databases
    1. Overview of SQL
      1. Definition and Purpose
        1. History and Evolution of SQL
          1. Declarative vs Procedural Languages
            1. Role in Data Management and Analysis
              1. SQL Standards and Compliance
                1. Common SQL Dialects
                  1. MySQL
                    1. PostgreSQL
                      1. SQL Server
                        1. Oracle
                          1. SQLite
                            1. BigQuery
                          2. Relational Database Concepts
                            1. Database Management Systems
                              1. Client-Server Architecture
                                1. Database Engines
                                  1. Storage Systems
                                  2. Structure of Relational Databases
                                    1. Databases
                                      1. Schemas
                                        1. Tables
                                          1. Rows
                                            1. Columns
                                              1. Cells
                                              2. Data Types
                                                1. Numeric Types
                                                  1. INTEGER
                                                    1. BIGINT
                                                      1. SMALLINT
                                                        1. DECIMAL
                                                          1. NUMERIC
                                                            1. FLOAT
                                                              1. DOUBLE
                                                                1. REAL
                                                                2. String Types
                                                                  1. CHAR
                                                                    1. VARCHAR
                                                                      1. TEXT
                                                                        1. NCHAR
                                                                          1. NVARCHAR
                                                                          2. Date and Time Types
                                                                            1. DATE
                                                                              1. TIME
                                                                                1. DATETIME
                                                                                  1. TIMESTAMP
                                                                                    1. INTERVAL
                                                                                    2. Boolean Types
                                                                                      1. Binary Types
                                                                                        1. BLOB
                                                                                          1. VARBINARY
                                                                                          2. Special Types
                                                                                            1. NULL Values
                                                                                              1. Auto-increment Types
                                                                                            2. Relationships Between Tables
                                                                                              1. One-to-One Relationships
                                                                                                1. One-to-Many Relationships
                                                                                                  1. Many-to-Many Relationships
                                                                                                    1. Self-Referencing Relationships
                                                                                                  2. Keys and Constraints
                                                                                                    1. Primary Keys
                                                                                                      1. Definition and Purpose
                                                                                                        1. Composite Primary Keys
                                                                                                          1. Auto-incrementing Keys
                                                                                                            1. Natural vs Surrogate Keys
                                                                                                            2. Foreign Keys
                                                                                                              1. Referential Integrity
                                                                                                                1. Cascading Actions
                                                                                                                  1. ON DELETE CASCADE
                                                                                                                    1. ON DELETE SET NULL
                                                                                                                      1. ON UPDATE CASCADE
                                                                                                                        1. ON UPDATE SET NULL
                                                                                                                      2. Unique Constraints
                                                                                                                        1. NOT NULL Constraints
                                                                                                                          1. Default Values
                                                                                                                            1. Check Constraints
                                                                                                                              1. Domain Constraints
                                                                                                                              2. Relational Algebra Fundamentals
                                                                                                                                1. Selection
                                                                                                                                  1. Projection
                                                                                                                                    1. Cartesian Product
                                                                                                                                      1. Joins
                                                                                                                                        1. Set Operations
                                                                                                                                          1. Union
                                                                                                                                            1. Intersection
                                                                                                                                              1. Difference
                                                                                                                                              2. Division
                                                                                                                                                1. Renaming