Skip to main content
CF

SQL & MySQL Subqueries: Understanding the weird parts

8h 53m 49s
English
Paid

Master the Art of SQL Subqueries with this Comprehensive Course - Take Your Data Management Skills to the Next Level! Whether you're a beginner or an experienced SQL user, learn to effectively use subqueries to extract and manipulate data from your databases.

Course Overview

This course provides an in-depth exploration of different types of subqueries, including nested, correlated, scalar, row, column, and inline view subqueries. You will also learn essential SQL techniques such as JOIN, EXISTS, WHERE, HAVING, GROUP BY, and more. Our expert instructor will demonstrate how to utilize these techniques to solve real-world problems, enhancing your ability to combine subqueries with other SQL functionalities for maximum efficiency.

Learning Outcomes

By the end of this course, you will gain a profound understanding of how subqueries work and how to use them to extract the information you need from your databases. You will be equipped to create complex and powerful queries, enabling you to analyze and manage your data like never before.

Who Should Enroll?

The course is designed for individuals at all proficiency levels, ranging from beginners to experienced SQL users. It encompasses a wide spectrum of databases including MySQL, PostgreSQL, Microsoft SQL Server, and Oracle Database. Our step-by-step approach introduces you to the basics before progressing to more advanced techniques, ensuring a comprehensive understanding of SQL subqueries.

Practical Experience

With hands-on exercises and practical projects, you will acquire experiential learning through working with subqueries. Our experienced instructor, along with a supportive online community, will be accessible for guidance and to address any queries you might have.

Enroll Today

Enroll in this course now and propel your data management skills to the next level. Master SQL subqueries and become proficient in extracting and manipulating data from your databases.

About the Author: Udemy

Udemy thumbnail

Udemy is the largest open marketplace for online courses on the internet. Founded in 2010 by Eren Bali, Oktay Caglar, and Gagan Biyani and headquartered in San Francisco, the company went public on the Nasdaq in 2021 under the ticker UDMY. The platform hosts well over two hundred thousand courses across software development, IT and cloud, data science, design, business, marketing, and creative skills, taught by tens of thousands of independent instructors. Roughly seventy million learners use it worldwide, and the corporate arm — Udemy Business — supplies a curated subset of that catalog to enterprise customers.

Because Udemy is a marketplace rather than a single editorial publisher, the catalog is uneven by design. The strongest material lives in the long-form, project-based courses authored by working engineers — full-stack JavaScript, React, Node.js, Python data science, AWS, Docker and Kubernetes, mobile development with Flutter and React Native, and cloud certification preparation. The CourseFlix listing under this source is the slice of that catalog that has been mirrored here for offline-friendly viewing, organized by topic and updated as new releases land. Pricing on Udemy itself swings dramatically with the site's near-permanent sales, which is why the platform is best treated as a deep reference catalog: pick instructors with strong reviews and a track record of updating their material rather than buying on the headline price alone.

Watch Online 170 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 170 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Importance of Subquery
All Course Lessons (170)
#Lesson TitleDurationAccess
1
Importance of Subquery Demo
05:32
2
Beginning Subquery - With Example I
11:26
3
Beginning Subquery - With Example II
07:00
4
Beginning Subquery - With Example III
05:30
5
Nested Subquery - SubQuery with LIKE
06:12
6
Nested Subquery - Mangers of Employee SubQueries
10:22
7
Nested Subquery - Employee Territories
05:25
8
Nested Subquery - CategoryName
03:37
9
Nested Subquery - Suppliers
03:24
10
Nested Subquery - Product Ordered
02:40
11
Nested Subquery - Employee Without Orders
02:45
12
Nested Subquery - Employees with same region
03:10
13
Nested Subquery - Territories not assigned to employee
02:35
14
Nested Subquery - Freight of orders
02:24
15
Nested Subquery - Supplied categories of seafood
04:38
16
Nested Subquery - customers in the same city
02:46
17
Nested Subquery - Employees with same manager
03:43
18
Nested Subquery - Products with reorderLevel
04:14
19
Nested Subquery - Employee under managers who have managers
15:08
20
Nested Subquery - Supplier who live in Spain
05:52
21
Nested Subquery - Territories names Assigned to Employees
04:33
22
Nested Subquery - Products Supplied by Same Company
02:49
23
Nested Subquery - Customers who placed orders
05:49
24
Nested Subquery - Products never ordered
02:21
25
Nested Subquery - Territories never assign to Employees
02:58
26
Nested Subquery - Customers Who Never Placed Orders
02:37
27
Nested Subquery - Employees not assigned to Territories
01:42
28
Nested Subquery - Order Placed in 2008
03:32
29
Nested Subquery - Employees who have the same territories
03:30
30
Nested Subquery - Products ordered by customers
01:50
31
Nested Subquery - Employees Managed by Funk
03:06
32
Nested Subquery - Suppliers who supplied products to a customers
04:50
33
Nested Subquery - Customers who placed order more than 30
03:00
34
Nested Subquery - Employees with same territory
03:03
35
Nested Subquery - Customer Ordered Beverages Products
04:30
36
Nested Subquery - Suppliers for London Customers
03:23
37
Question - Product Never Order by Retails - Subquery
00:43
38
Solution - Product Never Order by Retails - Subquery
07:14
39
Question - Category of Products Ordered in Germany
00:53
40
Solution - Category of Products Ordered in Germany
02:36
41
Question - Territories Assigned to Sale Rep Employees
00:24
42
Solution - Territories Assigned to Sale Rep Employees
02:23
43
Question - Customers who ordered beverages products
00:15
44
Solution - Customers who ordered beverages products
03:01
45
Question - Employees in Charge of Seattle
00:16
46
Solution - Employees in Charge of Seattle
03:10
47
Question - Products Ordered By Customers Who are Owners of Business
00:22
48
Solution - Products Ordered By Customers Who are Owners of Business
02:38
49
Question - Products Ordered By Customers From Germany - Subquery
00:22
50
Solution - Products Ordered By Customers From Germany - Subquery
02:39
51
Question - Supplier Who Supplied to Customer in WA Region - Subquery
00:22
52
Solution - Supplier Who Supplied to Customer in WA Region - Subquery
01:49
53
Question - Supplier Who Supplied to Customer in WA Region & Cost Above 4000
00:30
54
Solution - Supplier Who Supplied to Customer in WA Region & Cost Above 4000
04:52
55
Question - Customers Ordered UK Suppliers Products
00:17
56
Solution - Customers Ordered UK Suppliers Products
01:31
57
Introduction to JOIN
02:59
58
Introduction to Inner Join by Example
06:20
59
Rearranging your query
00:45
60
Indicating Source of Columns
03:58
61
Alias with Join
05:14
62
"USING" with Join
02:19
63
Inner Join - ProductName, UnitPrice and SupplierName
04:09
64
Inner Join - ProductName and Categories
03:06
65
Inner Join - Product Name, Supplier and Category
03:03
66
Inner Join - Quantity of Product, ProductName and Suppliers
06:18
67
HAVING - Understanding Having for Join and Subquery
07:04
68
HAVING - Understanding Having Example
02:42
69
Customers, Employee and Orders
03:21
70
Number of Orders per Employee Exercise with Solution
02:47
71
Suppliers, Products and Total Quantity
04:25
72
Question - Join - CategoryName and TotalQuantity
01:17
73
Solution - Join - CategoryName and TotalQuantity
02:02
74
Question - Join - Customer Purchased above 100 dollars
00:37
75
Solution - Join - Customer Purchased above 100 dollars
02:53
76
Question - Customers Who Ordered from a Specific Supplier
01:07
77
Solution - Customers Who Ordered from a Specific Supplier
02:13
78
Question - Customer, Supplier, Quantity and Total Price
00:14
79
Solution - Customer, Supplier, Quantity and Total Price
02:51
80
Question - AveragePrice, Products and Customers
00:30
81
Solution - AveragePrice, Products and Customers
02:34
82
Question - customers, products, supplier in Germany
00:31
83
Solution - customers, products, supplier in Germany
02:02
84
Question - Total Quantity of Products for Customer and Supplier in Same Country
00:53
85
Solution - Total Quantity of Products for Customer and Supplier in Same Country
02:05
86
Question - List of Customers, Products, Categories & Suppliers
00:21
87
Solution - List of Customers, Products, Categories & Suppliers
06:05
88
Question - Employees and a Specific Supplier
00:32
89
Solution - Employees and a Specific Supplier
01:01
90
Question - Employees Who Managed More than 10 Orders
01:48
91
Solution - Employees Who Managed More than 10 Orders
04:30
92
Question - Average UnitPrice, Supplier and Customers from France
00:16
93
Solution - Average UnitPrice, Supplier and Customers from France
02:18
94
Question - Total Quantity of Product, Suppliers sold more than 1200 units
00:33
95
Solution - Total Quantity of Product, Suppliers sold more than 1200 units
00:20
96
Final Join Question
00:33
97
Final Join Solution
00:46
98
NEXT?
00:38
99
Question & Solution 1 - Join & Subquery
10:54
100
Question & Solution 2 - Join & Subquery
04:49
101
Question & Solution 3 - Join & Subquery
09:22
102
Question & Solution 4 - Join & Subquery
02:28
103
Question & Solution 5 - Join & Subquery
02:20
104
Question & Solution 6 - Join & Subquery
08:29
105
Question & Solution 7 - Join & Subquery
02:43
106
Question & Solution 8 - Join & Subquery
02:57
107
Question & Solution 9 - Join & Subquery
02:52
108
Question & Solution 10 - Join & Subquery
04:01
109
Introduction to Single-Row Subquery
03:29
110
Example 1 - Employee who has been with the company the longest
04:43
111
Example 2 - Customer Who Placed the latest Order
03:50
112
Example 3 - Product with highest unitPrice
02:17
113
Example 4 - Order with Highest Freight Value
01:28
114
Example 5 - Number of OrderID by Customer With Most Orders
04:12
115
Exmaple 6 - Most Expensive Products Per Category
04:21
116
Introduction to CTE
01:58
117
CTE Subquery by Example
04:37
118
CTE - Retrieve all Customers with Total Ordeer Amount
05:08
119
CTE - Product Sales Per Category
02:37
120
CTE - Top Selling Products
02:03
121
CTE - Average unit price per category
03:08
122
CTE - Total and Average Sales
10:37
123
CTE - TotalSales and RegionSales
04:37
124
CTE - Top Five Customers
02:23
125
CTE - Discontinued Products
01:59
126
CTE - Average Order Value
02:09
127
CET - Top Five Products By Sales
02:14
128
Understanding Inline View Subquery
03:58
129
Inline View - Discount Amount for Products
05:08
130
Inline View - Average Order Value Per Customer
12:10
131
Inline View - Top 5 Customers By Total Orders
04:46
132
Inline View - Product Ordered By Largest Number of Customers
06:32
133
Inline View - Top 10 By Quantity Sold
06:00
134
Understanding Scalar Subquery
02:01
135
Scalar Subquery - Customers with Orders More than 20
04:28
136
Scalar Subquery - Employees who sold more than 100k
04:54
137
Scalar Subquery - Orders shipped by the most recent Employee
02:09
138
Scalar Subquery - Categories where average unit price greater than $30
02:48
139
Scalar Subquery - Orders of employees with fewest orders
05:05
140
Understanding Multiple-Row Subquery
03:52
141
Multiple-Rows Subquery - Products Ordered More Than 50 Times
02:18
142
Multiple-Rows Subquery - Customers who placed orders in 2008
00:58
143
Multiple-Rows Subquery - Employees that have made at least one sales
00:44
144
Multiple-Rows Subquery -Categories with at least 10 products
00:57
145
Multiple-Rows Subquery - Suppliers with product more than 100
01:04
146
Multiple-Rows Subquery - Products that have UnitPrice greater than its category
01:35
147
Multiple-Rows Subquery - More exercise and solution
05:04
148
Understanding Correlated Subquery I
04:13
149
Understanding Correlated Subquery II
02:41
150
EXISTS for Correlated Subquery
01:42
151
Correlated Subquery - At one order in Beverages category
03:26
152
Correlated Subquery - Customers who have not placed any order in condiments
01:25
153
Correlated Subquery - Products not ordered by customers from Germany
01:47
154
Correlated Subquery - Customers Placed Orders for Discontinued products
00:52
155
Correlated Subquery - More Exercise with Solution
01:34
156
Selecting all columns
01:08
157
Selecting a Specific Column
01:27
158
Selecting Multiple columns
01:30
159
Selecting Multiple columns II
01:00
160
How to use DISTINCT
01:37
161
Distinct on multiple columns
02:25
162
Distinct on multiple columns II
01:57
163
Understanding WHERE (Filter)
04:35
164
Where and = by Example
01:52
165
Where and <> By Example
01:13
166
Where and != By Example
00:56
167
Where and > By Example
01:35
168
Where and >= By Example
00:46
169
Where and < By Example
00:17
170
Where and <= By Example
00:22
Unlock unlimited learning

Get instant access to all 169 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Related courses

Frequently asked questions

What are the prerequisites for this course?
This course is suitable for individuals at all proficiency levels, including beginners. While no prior experience with SQL is required, familiarity with basic database concepts can be helpful. The course starts with foundational topics such as basic subqueries and progresses to more advanced techniques, ensuring that learners with varying levels of experience can follow along.
What types of subqueries will I learn about in this course?
The course covers a wide range of subquery types, including nested, correlated, scalar, row, column, and inline view subqueries. Each type is explained in detail with examples, helping students understand how to construct and apply these subqueries in various data management scenarios.
How does this course compare to other SQL courses in terms of depth?
This course offers an in-depth exploration of SQL subqueries, focusing specifically on their application and integration with other SQL functionalities like JOIN, EXISTS, WHERE, HAVING, and GROUP BY. With 170 lessons, it provides a comprehensive look at subqueries, making it more detailed in this specific area compared to general SQL courses.
What platforms does this course cover?
The course is designed to be applicable across a variety of database platforms, including MySQL, PostgreSQL, Microsoft SQL Server, and Oracle Database. This ensures that the knowledge gained can be applied broadly, regardless of the specific database management system you are using.
What is the estimated time commitment for completing this course?
The course consists of 170 lessons, which include practical exercises and examples. While the total runtime is not specified, students should expect to spend a significant amount of time engaging with the course materials and exercises to fully grasp the concepts covered.
What practical skills will I gain from this course?
By the end of the course, you will have developed the ability to construct complex SQL queries using various types of subqueries. This includes using subqueries to solve real-world problems, enhancing your data management and analysis capabilities. You will also learn to effectively combine subqueries with other SQL functionalities for more efficient database queries.
What topics are not covered in this course?
While the course provides a comprehensive overview of SQL subqueries and their applications, it does not cover other SQL topics in depth, such as database design, data warehousing, or advanced SQL performance tuning. The focus remains on mastering subqueries and related techniques for data extraction and manipulation.