We Learn SQL #13 | Intro to correlated subqueries in SQL
HTML-код
- Опубликовано: 24 июл 2024
- See the difference between Subqueries and Correlated Subqueries in SQL. How to write them correctly and why they can be useful in your work.
If you want to learn or practice SQL, check out learnsql.com/.
Hi, I’m Adrian. Welcome to another video in the series about SQL basics. You should already know how to write subqueries that return single and multiple values, how to use ANY and ALL, and how to write subqueries in the FROM clause. In this clip, we’ll talk about yet another one: correlated subqueries in SQL. What are these? Let’s find out together.
👌 Subscribe to our channel and leave a comment!
👌 Do you want to learn SQL? Go to LearnSQL.com and choose the course or track that is best for you!
👌 Join us on Facebook: / welearnsql
🔊 Music: www.bensound.com/ Наука
The background music sound is very annoying 😐
Thank you for this video! Love the diagrams showing what matches to what. These are great examples for someone totally new to correlated subqueries!
can you please remove the music in future videos as it makes it difficult to watch in higher speeds and most students like me usually go through at 1.5 -2x speeds
this is my favorite video explaining correlated and uncorrelated subqueries. thank you
Amazing explanation! Makes it a lot easier to understand! Thanks
Brilliant thank you
great explanation
In the first example if the sub query returns more than one row then the query should look like this right ?
SELECT name
FROM country
WHERE id IN (
SELECT country_id
FROM city
WHERE city.population = country.population AND country.id = city.country_id);
I couldn't understand that correctly due to my english level and the understanding skill but I'm thinking that correlated subquery like using equal means it's a thing like "group by".
What will happen if we put reverse in subquery
City. Countryid = bigCity.CountryID?
Is this same?
Good video. But you may consider to reduce the background sound or drop it altogether. Thanks. Good job tho. Peace
Please remove background music, hard to focus on what you're saying. Otherwise, great video!
I'm really trying to listen to you but the music is so annoying...
Thanks, till now it's the hardest SQL topic for me, which I couldn't understand from a book. I'm starting to understand.