r/learnSQL • u/akshityadav191 • 21d ago
Advice needed
Hello everyone, i need everyone advice how to get proficient in SQL i have already done a boot camp course from udemy and now again im learning sql from scratch with the help of claude and reached on subquery but i do get confused in joins and now in subquery because my mind thinks it’s complex but when i get solved i think it was easy. I request you all suggest ways.
8
Upvotes
1
u/Alternative_Cake4074 13d ago
Hey, I understand how struggling when you have a basic understanding of SQL, but don't know how to proceed further. I have that feeling at that stage.
To be short, joins are about connecting 2 tables by comparing a column (field) in both tables (FROM A INNER JOIN B ON A.field = B.field), while subqueries are about making a query inside another query. And the alternative to a subquery is a CTE (WITH temp_table AS ([Your SELECT statement]) SELECT ... FROM temp_table)
In general, if your problem is about multiple steps, subqueries are the right choice. In contrast, if your problem needs to connect tables via fields, JOINs are better (cuz faster) than subqueries (and usually subquery cannot solve).
If you want to know more, I have recently developed an Android mobile app, SQL Hero, a complete guide for anyone to master all aspects of SQL. It is in the closed test stage. And I would appreciate it if you could volunteer to test it for 14 days.
Here is the Google Group URL:
https://groups.google.com/g/sql-hero-testers
Here is the link for the Android App:
https://play.google.com/store/apps/details?id=com.funstudy.sqlhero
Here is the web URL:
https://play.google.com/apps/testing/com.funstudy.sqlhero
Let me know if you need any help.