- Learn how to use the SQL SELECT statement in PostgreSQL to retrieve, filter, and format data with specific columns, DISTINCT, and expressions.
By the end of this module, you'll be able to:
- Select all or specific columns from a table
- Use DISTINCT to remove duplicates
- Create calculated columns with expressions or functions
- Concatenate values into a single output
- Learn how to filter data in PostgreSQL using the WHERE clause, logical operators, pattern matching, and subqueries for advanced query control.
By the end of this module, you'll be able to:
- Filter data using the WHERE clause
- Combine conditions and use functions like EXTRACT, NOW(), and CAST
- Use subqueries to feed one query into another
- Apply subqueries in SELECT, FROM, WHERE, and UPDATE statements
- Learn to control the size and order of query results in PostgreSQL with the LIMIT, OFFSET, and ORDER BY clauses. Master pagination, sorting, and optimizing performance with these essential SQL tools.
By the end of this module, you'll be able to:
- Use LIMIT to retrieve a specific number of rows
- Combine OFFSET with LIMIT to implement pagination
- Load data incrementally using LIMIT and OFFSET
- Maintain consistent results with ORDER BY
- Combine data across multiple PostgreSQL tables using SQL JOINs. Learn INNER, LEFT, RIGHT, FULL OUTER, and NATURAL joins with real examples.
By the end of this module, you'll be able to:
- Understand the purpose of joins in databases
- Use INNER JOIN to return matching rows
- Apply LEFT and RIGHT JOIN to include all rows from one table
- Use FULL OUTER JOIN to combine all rows from both tables
- Use NATURAL JOIN to join tables by columns with the same name
- Analyze data in PostgreSQL with aggregate functions and grouping. Learn COUNT, SUM, AVG, and filter results using GROUP BY and HAVING.
By the end of this module, you'll be able to:
- Understand the role of aggregate functions in data analysis
- Use COUNT to count all rows or distinct values in a column
- Use SUM to calculate the total of values in a numeric column
- Use AVG to compute the average of numeric values in a column
- Use MIN and MAX to find the lowest and highest values in a column
- Group data using GROUP BY to apply aggregate functions to each group
- Differentiate between GROUP BY and DISTINCT, and use GROUP BY even without aggregate functions to list unique values
- Use HAVING to filter grouped results based on aggregate function outcomes
Learn Backend Development Part-Time, Online
Power BI Fundamentals - Create visualizations and dashboards from scratch
Overview
Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Syllabus
- Getting started: An introduction to SQL and reading data
- Introduction
- Sample database
- Simple SELECT
- Concatenation and calculated columns
- Summary
- Filtering data: The WHERE clause and subqueries
- Introduction
- Sample database
- WHERE Clause
- Subqueries
- Summary
- Organizing data: Using LIMIT, OFFSET, and ORDER BY clauses
- Introduction
- Sample database
- ORDER BY
- LIMIT and OFFSET
- Summary
- Combining data from multiple tables: SQL Joins Explained
- Introduction
- Sample database
- INNER JOIN
- LEFT and RIGHT JOIN
- NATURAL and FULL JOIN
- Summary
- Summarizing data: Aggregate functions and grouping
- Introduction
- Sample database
- Aggregate Functions
- GROUP BY and HAVING
- Summary