r/learnSQL • u/DrUstela • Mar 24 '26
Need Help :( stuck in loop
Okay so I can understand syntax and can write code at intermediate level if provided with a hint like which table to look at , what to join,but without hint i can't logically think of the connection especially in sub query , case etc when slightly complicated questions are asked. I tried writing on paper and decoding,still struggled a lot .Any suggestions how to improve my logical reasoning. Sorry I'm from a non tech role , trying hard to learn this stuff thx .
8
Upvotes
View all comments
Show parent comment
1
u/dahya_mistry Mar 26 '26
Ok, so you have to do it, I'm guessing that you'll get in to CTEs later. With subqueries the important thing is the join condition, you have a join between a table in the sub query and a table in the outer query. It's very much like doing a normal left outer join, but written differently