
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Learn to select specific columns in PostgreSQL by avoiding the star, retrieving only the id, or choosing id, first name, and last name with comma-separated syntax.
Sort records with order by to arrange query results by age in ascending or descending order, and apply multiple order by clauses such as first name then age for tie-breaks.
Mastering PostgreSQL covers limit and offset to control query results, illustrating how to fetch the five oldest students and paginate results using order by age desc, limit, and offset.
Mastering PostgreSQL: learning by real examples explains the is null operator, why equal to null fails, and how to use is null and is not null to filter records.
Learn to use column and table aliases in PostgreSQL, rename a column with the as operator, and shorten table references with aliases like est and sd to simplify complex queries.
Explore the left string operator in PostgreSQL, extracting the first three characters from a string to create a short name column.
Learn to use the length operator in PostgreSQL to measure string length, compute letters in first names, and order results by name length with practical examples from student.
Apply the PostgreSQL replace function to swap substrings in a column, demonstrated by replacing st with sdu in student ids and viewing the updated results.
Explore PostgreSQL trim operators to remove spaces from leading, trailing, or both sides, with practical examples like trimming student first names before saving to the database.
Explore aggregates by performing calculations on tables, such as sum, count, and average ages, to return a single value like minimum or maximum, with practical real examples to follow.
Explore the count operator, an aggregate function tallying rows. See examples counting all students and those named Matt, with where to refine by date, year, or name.
Learn to filter groups by aggregates using the having clause in PostgreSQL, with an age-count example to return groups with multiple instances.
Learn how the over operator enhances aggregation by displaying per-row results, solving group by limitations with average age calculations for all students.
Learn how to use a left join to merge course registrations with student names, applying on conditions to pull first names from the students table while handling nulls and duplicates.
Learn how the inner join merges two tables on a matching condition and omits non-matching rows, unlike the left join example with students and course registrations.
This is a course intended for software engineers and data analysts that want to learn more about Relational Databases and SQL It covers both basic and advanced SQL concepts and theories. The course is intended for both Junior and Senior Level Engineers and is purely focused on SQL and writing queries.
PostgreSQL will be used in this course. But the theories you learn can be applied in any Relational Database such as SQL Server or MySql
All the sections are explained by one or more examples. I used a sample database that had students, courses, registrations and instructors records. Learning by doing examples is a much better technique than just studying a theory.
This course contains lectures and exercises. You'll get immediate practice on all of the different topics and features that you learn!
You will learn about:
Selecting Data
Aggregate Functions
Built in Functions
Joins
Dates
Schema and Data
CRUD Operations
Transactions
Arrays in Postgres
JSONs in Postgres
And More!
Data is the core of an application. Any application that you see on your phone or on your website uses some storage somewhere. Having a good database design and queries is very crucial for any application. This course focuses mainly on the querying part.
At the end of the course, you should be able to:
Master basic query syntax and functionality: Students will learn the syntax of basic SQL queries, including SELECT, FROM, WHERE, GROUP BY, and ORDER BY. They will also gain an understanding of how to filter and sort data, and how to use basic functions and operators.
Develop proficiency in advanced querying techniques: Students will learn how to write more complex queries, including subqueries, inner and outer joins, and aggregations. They will also learn how to use advanced functions and operators such as CASE statements, window functions, and regular expressions.
Optimize queries for performance: Students will learn how to optimize queries for faster execution, including indexing strategies, query planning and execution, and common performance issues to avoid.
Apply queries to real-world scenarios: Students will learn how to apply their query skills to solve real-world problems. They will also explore best practices for data modeling and query design to ensure their queries are accurate and efficient.