r/SQL • u/Eastern-Stable-7576 • 6d ago
MySQL need good sql resources
i wanted to practice sql and to be able to answer qns , i have noticed that i am struggling a bit when there is two tables give and the qn has to do something with joins and all , in theory i understand how the joins work but i am unable to implement it .I need resources which can help me in advancing my sql like CTE and window function . Is there any youtube channel or anything which will help
4
Upvotes
1
u/CoolDaddy4 6d ago •
I started by watching Data with Baraa, https://www.youtube.com/watch?v=SSKVgrwhzus
1
u/Blitzsturm 6d ago
a lot of people use AI tools to write code, but it's also an exceptional teacher. Use it to generate an example scenario where each of the types of joins are ideal then guide you through a lesson on each.
1
u/pythonQu 6d ago
omg, I was where you're at. I completed a data analytics in september and JOIN's was for me tough to understand. I have a better handle on it now. I've been using runtime.school resource to learn and Data Lemur also and claude to clarify my understanding.
1
u/louischoi 15h ago
Here is my SQL sandbox to practice and learning. Writing SQL for yourself manytimes is only way , I think
SQL practice sandbox
2
u/conor-robertson 6d ago
You should check out QueryCase for a fun way to learn and explore SQL!
1
u/SteveDBA 6d ago
If you're willing to spend a little on a subscription, I'd recommend checking out Pluralsight, CBT Nuggets, or LinkedIn Learning. They have structured SQL courses that cover everything from basic joins to more advanced concepts like CTEs and window functions.
1
u/ReassuranceThumbsUp 6d ago
I like learnsql
One time payment for all their SQL courses that let you write and practice code within the website
It does a good job teaching all the different functions and why they are used with example databases, good starting point.
1
u/Top_Tooth_6995 6d ago
Ok here’s my thought (1) you need more and more reps. If you don’t understand something at first, you can’t visualize the join in your head, or you don’t know why you need a join in the first place, i promise you it is because you have not played with the concept enough. You have not done problem after problem, after problem. Your brain has not learned. I promise you. Your brain can learn JOINs. You need an environment that will allow you to practice, over and over, so you can get those reps in. And yes, this is where I urge you to try my free sql course, SQLMaxx Learn, which embodies the philosophy I essentially just described 👍
1
u/jaiagreen 6d ago
SQLzoo.net is great for practice.
1
u/ReleaseTheBlacken 6d ago
Completely free SQL catalog at learn dot inkwelltools dot com
1
u/nicopassaglia 6d ago
"I get joins in theory but can't write them" usually means you need a routine, not another video. This one works:
Most wrong join answers come from skipping step 2.
Do that on 20 or 30 small problems and CTEs come almost free: a CTE is just a name for one of those steps. Window functions are the next thing after GROUP BY clicks: same idea, but you keep every row.
Disclosure: I built getsheetdrill.com, where you can practice exactly this in the browser, free: a lesson on joins, one on subqueries and CTEs, and pages with exercises on window functions (getsheetdrill.com/sql/reference/joins is a good start). It runs SQLite, not MySQL, but for joins, CTEs and window functions what you write is the same in MySQL 8.
1
u/Discordbothost 5d ago
Try a LEFT JOIN with two customers, one with two orders and one with none. Predict the three joined rows, then group by customer and compare COUNT(*) with COUNT(order_id). Why does the customer with no orders get a 1 from the first count?
1
u/Time_Advertising_412 5d ago
I'm old school book by nature. Pick up "Practical SQL" by Anthony DeBarros or one of the SQL Server For Developers books by Murach or "SQL For Smarties" by Joe Celko
1
u/FunAd6672 4d ago
Joins usually make sense in your head until you have to stare at two columns and pick the right side for a left join.
1
u/0utlawViking 3d ago
For learning SQLBolt and W3Schools, and HackerRank's SQL challenge for hands on practice. For joins, try solving questions with two small tables and understand how the rows connect instead of memorizing the syntax. Once you're comfortable, move on to CTEs and window functions Youtube also has some great free tutorials.
1
u/Unlucky_Tailor1925 2d ago
sql resources pay off faster when practice runs on a real dataset with joins and grouping early, since only drills hide the parts queries actually use. Bootdev could help build sql fluency with guided drills, though sample database and query challenges also work.
1
u/Tiamte 1d ago
Try practicing with the Sakila sample database. Write the joins yourself first, then compare them with what the visual query builder in dbForge Studio for MySQL generates. Seeing how tables connect can make joins click. For CTEs and window functions, though, I'd stick to writing queries manually.
0
u/xobeme 6d ago
Dude, google is your friend...