Learn SQL using PostgreSQL from beginner to advanced: prerequisites & environment setup, history of RDBMS concepts & why choose PostgreSQL, relational design normalization & DDL concepts, PostgreSQL data types & constraints management, data manipulation language DML & basic querying, filtering sorting paging & aggregation queries, advanced table joins, subqueries set operations & expressions, advanced data types JSONB & array support, window functions, common table expressions CTE & recursive queries, transaction management ACID & concurrency control, views materialized views & generated columns, stored procedures functions PL/pgSQL & triggers, deep dive indexing strategies, query optimization & explain analyze, roles security management & row level security, full-text search & pgvector, table partitioning for large-scale data, backup replication & pgbouncer, and a production-grade e-commerce database case study, with 21 episodes in total.
Before diving deeper into SQL and PostgreSQL, there are several basic skills and tools you need to prepare first, ranging from your ability to operate a terminal, installing the PostgreSQL server, to getting to know psql and GUI clients to make exploring your database easier.

This episode covers the birth of the relational data model from Edgar F. Codd in 1970, PostgreSQL's evolution from the Ingres project at UC Berkeley to its official name, the reasons why PostgreSQL has become the database of choice in the modern world, as well as its comparison with MySQL, MariaDB, and SQLite.

This episode covers the foundations of relational database design: Entity Relationship Diagrams, Primary Keys and Foreign Keys, data normalization principles from 1NF to BCNF, as well as hands-on practice with Data Definition Language (DDL) for creating, altering, and dropping databases and tables.

This episode covers PostgreSQL's main data types: numeric, character, date and time, boolean, and UUID. It also covers constraint management such as NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY with referential actions, and CHECK to maintain data integrity.

This episode covers Data Manipulation Language (DML): INSERT to insert data, UPDATE to modify it, and DELETE to remove it. It also covers PostgreSQL's signature feature, the RETURNING clause, for directly retrieving data that was just manipulated.

This episode covers reading and processing data: SELECT with aliases and DISTINCT, filtering with comparison and logical operators, sorting with ORDER BY, paging with LIMIT OFFSET, and data aggregation using GROUP BY and HAVING.

This episode covers the concept of joins in relational databases: INNER JOIN, LEFT RIGHT and FULL OUTER JOIN, CROSS JOIN, as well as SELF JOIN for hierarchical data, including techniques for combining three or more tables in a single query.

This episode covers subqueries in the WHERE FROM and SELECT clauses, the CASE WHEN branching logic, the NULL-handling functions COALESCE and NULLIF, and the set operations UNION, INTERSECT, and EXCEPT for combining the results of multiple queries.

This episode covers PostgreSQL's hybrid side as an RDBMS and document store at the same time: the difference between JSON and JSONB, JSONB query operators such as the arrow operators and @>, the jsonb_set manipulation function, and the array data type with the ANY, @>, and UNNEST operators.

This episode covers window functions for advanced data analysis: the difference from GROUP BY, the anatomy of the OVER clause with PARTITION BY and window framing, the ranking functions ROW_NUMBER RANK DENSE_RANK NTILE, and the value functions LAG LEAD FIRST_VALUE and LAST_VALUE.
