r/SQL • u/Eastern-Stable-7576 • 2d 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
2
Upvotes
1
u/CoolDaddy4 2d ago •
I started by watching Data with Baraa, https://www.youtube.com/watch?v=SSKVgrwhzus
1
u/Blitzsturm 2d 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 2d 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.
2
u/conor-robertson 2d ago
You should check out QueryCase for a fun way to learn and explore SQL!
1
u/SteveDBA 2d 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 2d 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 2d 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 2d ago
SQLzoo.net is great for practice.
1
u/ReleaseTheBlacken 2d ago
Completely free SQL catalog at learn dot inkwelltools dot com
1
u/nicopassaglia 2d 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 1d 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 1d 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 1d 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 2h 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.
0
u/xobeme 2d ago
Dude, google is your friend...