Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
EssentialSQL: Subquery Magic - Master SQL Sub Queries.
Rating: 4.6 out of 5(439 ratings)
3,845 students

EssentialSQL: Subquery Magic - Master SQL Sub Queries.

Subquery MySql, PostgreSQL, SQLite, Microsoft SQL Server | TSQL | Correlated subquery | Inner query | Nested query
Last updated 6/2024
English

What you'll learn

  • Write subqueries to select data from multiple tables.
  • Create subqueries to return a single value or multiple values.
  • Use subqueries in the SELECT, FROM, WHERE, and HAVING clauses.
  • Understand and use correlated subqueries, which depend on values from the outer query.
  • Use subqueries to solve problems such as finding maximum or minimum values and records that don't have corresponding entries in other tables.
  • Understand the difference between IN, EXISTS, and ANY/ALL operators in subqueries.
  • How to use subqueries to create more complex queries and better understand the structure and relationships in a database.

Coding Exercises

This course includes our updated coding exercises so you can practice your skills as you learn.

See a demo
Image of coding exercise example

Course content

7 sections22 lectures2h 10m total length
  • Welcome to Subquery Magic1:49

    Welcome to Subquery Magic.  My goal is to help take the mystery out of subqueries and show you there is no magic to them at all!

    By the time you have completed the course, you will have a thorough understanding of subqueries, be able to write your own, and know when it’s best to use them.


     

  • What is a Subquery?7:39

    After completing this course know what subqueries are, and how to recognize them within a SQL query.

Requirements

  • You should already be familiar with SELECT, GROUP BY, and ORDER BY clauses
  • If you can write a simple select statement, then you're ready for this course!
  • No special equipment needed, all exercises are done online.
  • Optional: Install a MySQL, PostgreSQL, or SQL Server learning lab on your own computer.

Description

In this course, you will learn the fundamentals of subqueries and how to use them effectively in your MySql, PostgreSQL, or MS SQL Server SQL statements.  You will learn about different types of subqueries, including correlated and uncorrelated subqueries, and how to use them to solve complex problems. You will also learn about common pitfalls to avoid when working with subqueries, and how to optimize their performance in your queries.


By the end of this course, you will have a solid understanding of how to use subqueries in your SQL statements, and be able to apply this knowledge to a wide range of real-world scenarios.


In this Course you will Learn to:

  • Know and understand subqueries.

  • Identify subqueries in SQL.

  • Use subqueries in your select statement to make your queries more robust and less reliant on hard coded values.

  • Harness the power of derived tables to work around SQL limitations. Derived tables are also known as subqueries in the FROM clause.

  • Use subqueries in the WHERE clause with EXISTS and IN

  • Use subqueries with SUM, MAX and other Aggregate functions in GROUP BY and HAVING.

  • Write correlated subqueries so that your subquery is able work with the outer query to become more flexible and robust.

Nothing is worse than

  • Being excited to learn something new but not knowing where to start.

  • Wasting time learning the wrong features.

  • Being overwhelmed with options and not know which to use.

Imagine Having...

  • Knowledge - Knowing how to quickly use subqueries to take your SQL to the next level.

  • Confidence - Feeling good that you’re on the right track.

  • Accomplishment - Having a sense of accomplishment that you've learned something most cannot.

  • Fun - Actually having fun learning SQL subqueries!

By the time you’ve completed this SQL course you’ll have an appreciation of subqueries, overcome your fear, and able to write correlated queries to make your SQL more robust.

Who this course is for:

  • Beginner SQL query authors curious about subqueries.
  • If you're struck writing subqueries or baffled by correlated subqueries, then this course is for you!
  • Business analysts looking more ways to write queries
  • Recent college graduates looking to hone their SQL skills
  • Job applicants looking for that extra edge with their next interview!