r/learnSQL • u/yahoo_06 • 2d ago
I made a beginner-friendly SQL tutorial on Subqueries in PostgreSQL
Hey everyone!
I just published Lesson 9 of my beginner SQL series — Subqueries in PostgreSQL.
In this lesson, I explain:
- what a subquery is
- how to use subqueries inside WHERE
- how IN works with subqueries
- how to use aggregate functions like AVG() inside a subquery
- how subqueries can be used for data analysis
and how subqueries compare to using JOINs
I'm using the Pagila database for the examples, so everything is demonstrated with real data rather than just theory.
There are also practice tasks and mini quizzes throughout the video.
I'm building this into a full beginner-friendly SQL course, so feedback is very welcome!
Video: https://youtu.be/xBAJ4U2EY6E?si=bE5n9q2s5Ff6X7SE
Thanks for watching! :)