This repository serves as a structured guide to mastering SQL using PostgreSQL. It covers foundational SQL concepts, advanced query techniques, and practical exercises to help you become proficient in SQL through step-by-step learning.
-
Introduction to Databases and PostgreSQL
- What is a Database?
- Understanding Relational Database Management Systems (RDBMS)
- Overview of PostgreSQL and Its Features
- Setting Up PostgreSQL for Practice
-
- Introduction to SQL and its Applications
- Retrieving Data with the SELECT Statement
- Filtering Rows with WHERE Clause
- Sorting Results with ORDER BY
- Introduction to Data Types in SQL
- Basic Operators in SQL
- Read more examples here
-
Advanced Filtering and Grouping
- Utilizing the IN Operator
- Understanding the NOT IN Operator
- Introduction to LIKE Operator for Pattern Matching
- Handling NULLs in SQL Queries
- Grouping and Aggregating Data with GROUP BY
- Filtering Groups with HAVING Clause
- Read more examples here
-
Mastering Joins and Subqueries
- Understanding JOINs in SQL
- Performing Inner Joins, Outer Joins, and Cross Joins
- Self Joins for Advanced Data Analysis
- Using UNION and UNION ALL for Merging Results
- Working with Subqueries
- Read more examples here
-
Practical Application and Table Creation
- Creating Tables and Specifying Constraints
- Column-Level Constraints (
PRIMARY KEY
,UNIQUE
,NOT NULL
) - Table-Level Constraints (
FOREIGN KEY
,CHECK
)
-
- Inserting Data into Tables
- Updating Existing Records
- Deleting Records from Tables
- Read more examples here
-
Real-World Case Studies
- Case Study 1: Sales Analysis with SQL
- Case Study 2: Customer Segmentation with SQL
-
Self Practice
- Case Study: Employee Management and Reporting: Read the solved case studies from section 7 and apply your analytical skills to create similar case study on Employee managemenet & reporting.