r/SQL • • 16h 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

0 Upvotes

23 comments sorted by

View all comments

1

u/Blitzsturm 16h 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/Eastern-Stable-7576 16h ago

Ahh okayy i will surely give it a try . tq

3

u/Blitzsturm 16h ago edited 16h ago

hop into your favorite and throw down a prompt like:

I'm studying SQL and am wanting to focus on the topic of joins. Generate code to create table schema and populate it with simple example data in <your database type> and devise a lesson plan to explain the best use of every type of join and a give me a task to perform each join. I'll go through them individually, ask questions as needed and complete them so that I can fully understand how the join works and in what scenario each is best. When done, generate a study guide or cheat-sheet to help me remember the lesson.

* It's important to note AI can be a powerful tool, but you should never outsource your own thinking to it and be lazy. Use it to help strengthen your knowledge, check your work and if you need it to actually do work for you, make sure you understand everything it's doing and why; make sure it explains anything you're unsure of. You need to be able to fix understand and fix things without it but ignoring it completely leaves a powerful tool off the table.

1

u/Eastern-Stable-7576 15h ago

Omg thank you sm😭😭

1

u/xobeme 15h ago

This is a great suggestion. Once you learn the syntax, reading examples of code is the best way to learn it...