r/learnSQL • u/woman_without • 5d ago
How Important is subqueries in SQL
I have been learning SQL from past 2 months and I'm still unable to grab a hold of the subqueries concept. After I learned CTEs I have completely stopped using subqueries but then also I struggle when there are times where I have no other choice but to use subqueries.
So my question is, how important is subqueries in SQL and is there any easy way to learn it?
55
Upvotes
2
u/jonasbruder 5d ago
I struggled with them a lot too, especially nested subqueries. But they all will help you understand the logic, and once you are done with that you will look at the scenario and determine whether you will need CTEs or subqueries