
Discover the fundamentals of SQL and PostgreSQL, create and query databases, and master joins, subqueries, and common table expressions. Learn to work with views, aggregates, and time data in exercises.
Download and install PostgreSQL on Windows using the graphical installer, set the superuser password and port 54322, and finish the setup without launching Stack Builder.
Learn to create a PostgreSQL database with PgAdmin 4, including selecting servers, creating a database named Airlines, choosing template zero, and exploring the public schema.
Restore a PostgreSQL database using the admin four UI by selecting a SQL file and completing the restore, revealing eight tables in the airlines database.
Understand that the booking table is the main entity, linking a booking to multiple passengers with separate tickets; tickets include flight segments and boarding passes assign unique seats.
Explore the airline database schema, including bookings, tickets, passengers, boarding passes, flights, aircraft, and airports, and learn how schedules, statuses, and seating are modeled.
Explore common SQL data types across character data types, numeric data types, temporal data types, array data types, and JSON data types, with practical examples using select statements.
Learn how to use the select statement to query specific columns or all data from a table, including syntax, case sensitivity, and where clauses for filtering.
Master select queries to fetch all data from all tables and columns in the airlines database, using aircraft, model, and range.
Learn to use the select statement to query data from all columns and tables in an airlines database, counting rows across aircraft, airports, boarding passes, and bookings.
Learn how to remove duplicates with the select statement using the distinct keyword, and practice querying airports and time zones from the Airbus table.
Master the where clause in SQL to filter results using operators such as equal, greater than, less than, and not; apply like and logical conditions to airports and aircraft data.
Master SQL filtering with the where clause using equal, not equal, greater than, less than, and inclusive operators to refine select results with time zone and total amount examples.
Learn to filter data with the where clause using and and or operators in SQL, filtering seats by aircraft_code and fair_condition to show 20 rows, then 200 with or.
Explore the where clause and the like operator in SQL, using % and _ wildcards to filter aircraft models in the aircrafts table, such as Airbus and Boeing.
Master SQL concepts with the where clause, between, and in operators, and using as to alias columns in PostgreSQL, with practical range and date filtering examples.
Learn to use the like operator, limit, and order by clauses to filter, sort, and limit SQL query results, with practical passenger name examples.
Explore how to use the fetch and limit clauses, including offset, to retrieve specific rows from the boarding passes table in the airlines database, with hands-on examples.
Master the not in operator in SQL to exclude values with not in (values), using select and where clauses, illustrated by flight status filters.
Learn to filter null values with is null and is not null in SQL, using flight table examples to retrieve or exclude records with missing departure or arrival data.
Learn how to use the cast function in SQL and PostgreSQL to convert between data types, including integers, dates, booleans, and time intervals, with practical examples.
Explore aggregation using the count function, learn how to count all rows, specific columns, distinct values, and non-null values, and practice creating tables and inserting data in SQL.
Learn how to use the sum() function to aggregate the total_amount column from the booking table, returning a single line with the computed sum.
Learn to apply min, max, and average functions to the bookings table, computing the minimum, maximum, and average total_amount values.
Explore using the group by clause with select statements and aggregation functions to count airports by city and apply having to show cities with more than one airport.
Master the case clause in SQL within select statements, using when, then, else, and end to classify data, alias results, and build group by queries for bookings and ages.
Learn how to use the NULLIF function in SQL to return NULL when two expressions match, and count null values in actual_departure and actual_arrival columns in flights.
Learn how to use the coalesce function to replace null values in flight departure and arrival timestamps with the current timestamp, ensuring both columns are non-null and of timestamp type.
Explore core time functions and operators in PostgreSQL to query and extract data from timestamp columns, illustrated with practical examples from the bookings table.
Learn to use the timestamp extract function to pull day and month from booking dates, then aggregate daily sales from bookings with group by and order by.
Use date_trunc and date_part in SQL to convert timestamps into date parts, then group by day, month, or day of week to analyze bookings across periods.
Explore date handling in PostgreSQL by using double column date operators, the now() function, and current_date to filter bookings by specific dates and compare date components.
Learn how inner joins link data from two tables using a primary key and foreign key, practice with aircraft, seats, and model queries, and explore cancelled flight data.
Master SQL join types and set operators by exploring inner, outer (left, right, full), cross joins, and union, intersect, and except, with syntax and practical examples for querying multiple tables.
this lecture explains the left outer join, which retains all rows from the left table and matches from the right when the condition holds, with a tickets and bookings example.
Learn how left outer join preserves all rows from the left table, with the join condition, syntax, and a practical example using passengers, tickets, dates, and ascending order.
Master the right outer join by querying tables on a condition, returning all rows from the right table with matching rows from the left, illustrated with tickets, flights, and bookings.
Explore the differences between left join, right join, and full outer join, showing how each retrieves rows from related tables using on conditions and practical examples.
Discover how a cross join returns the cartesian product of two tables, generating every row combination—illustrated with aircraft, airports, and seats.
Learn to combine results from multiple tables using union, union all, intersect, and except in SQL, with syntax and practical examples.
Learn how to perform a self join in SQL using table aliases to compare rows in the same flight table, selecting flight number, arrival airport, and status, with limit.
Learn to use the using clause in SQL joins by joining tickets and bookings on book_reference, selecting key fields with results identical to an on-based join.
learn how natural join connects two tables by matching common column names, and compare it to inner join using aircrafts and seats as practical examples.
Ready to take your data querying skills to the next level? Look no further than this comprehensive PostgreSQL course!
Using real-world examples from the Airlines Database, this course covers everything you need to know about PostgreSQL, including:
- Installing and creating tables in PostgreSQL
- Understanding SELECT statements, WHERE clauses, and operators
- Advanced techniques like GROUP BY, HAVING, and Aggregation Queries
- Handling time and date data in SQL
- Table joins, sub-queries, and window functions for analytics
- SQL challenges and a final exam for extra practice
But why learn SQL in the first place? SQL was originally created to enable non-IT professionals to query data from datasets without needing to ask a programmer for help. By learning SQL, you'll develop new mental models for thinking about data, which is a powerful skill in today's data-driven world.
Plus, PostgreSQL is free, open, and unlimited, making it the perfect tool to learn about relational databases. Its advanced implementation of SQL is very close to the SQL standard, making your knowledge transferable to other SQL databases.
And perhaps the most compelling reason to learn SQL? It can do wonders for your career. Having PostgreSQL knowledge on your resume and online profile can make you a highly attractive candidate to recruiters, opening up new career opportunities and possibilities for advancement.
This course is taught by a top-rated instructor with years of real-world experience using PostgreSQL for data analysis. The lectures are clear, concise, and filled with practical examples to solidify your learning.
By the end of this course, you'll have job-ready skills in:
- Installing and configuring PostgreSQL
- Designing and normalizing database schemas
- Querying data with complex SELECT statements
- Using aggregate functions for analysis
- Joining multiple tables together
- Tuning queries for optimal performance
So what are you waiting for? Enroll in this course today and become a PostgreSQL querying expert! Your journey to becoming a data analysis pro starts now.