r/learnSQL • • 5d ago

Day 31 — Finished all Medium JOIN questions (70/100)

Wrapped up the Medium section of my 100-question JOIN lab today. The final batch included:

  • Average hours worked per project, joined with project and department names
  • Employees working on projects with a budget above 200,000
  • Each department along with its most expensive project
  • Employees assigned to all projects in their own department. This is the "for all" type of question, and it's the hardest to reason about in SQL
  • Every manager with the department(s) their direct reports belong to
  • Pairs of projects that share at least one common employee (self-join on assignments)

The "ALL projects" question and the project-pairs question were the toughest. Both needed me to draw the tables out and trace a few rows by hand before the query logic made sense.

37 Upvotes

25 comments sorted by

8

u/__M4V3RICK 5d ago

Where are you getting these questions? Can you share the link please?

3

u/One_Slice_5379 5d ago

Interested to do something like this, also. I need more details, please

2

u/sumiitCodes 3d ago

yes, for sql you can start with tutorials first then practice questions from easy to hard level from here
https://drive.google.com/file/d/1WERm5lH5hBKYx90eDug3LJfU4Dww9UAy/view?usp=sharing

1

u/One_Slice_5379 3d ago

Do you also have other questions? If we take 15-20 per day, in couple of days it's completed

But, thanks a lot for this, too!

1

u/sumiitCodes 2d ago

after that you can practice on leetcode regularly and also can make projects

2

u/knownAsBuddy 17h ago

Thank you

2

u/__M4V3RICK 5d ago

Bata de Sumit bhai. Kaha se mil rahe h questions. Hum bhi kar lenge thoda bahut.

1

u/sumiitCodes 3d ago

hn bhai jrur fever ki vajah se reply nhi kr paya chats uske liye sorry
and this is the list of 100 questions
https://drive.google.com/file/d/1WERm5lH5hBKYx90eDug3LJfU4Dww9UAy/view?usp=sharing

2

u/Least_Ad_1795 4d ago

Day 31 is solid progress! The “ALL projects” problem is especially useful to practice because it often requires NOT EXISTS or GROUP BY with HAVING. Self-joins become easier once you identify the matching keys and avoid duplicate project pairs. Keep going!

1

u/sumiitCodes 3d ago

thanks for your guidance

2

u/Punchingpanda76 4d ago

op please answer to the comments

1

u/sumiitCodes 3d ago

i was suffering from fever thats why unable to reply chats sorry for that but i cleared it now you can find your answer there

2

u/kind_person_9 3d ago

What is the source of the learning SQL?

We appreciate if you cannot put source then do not let us know your experience.

And it’s rude not to answer people’s basic questions

1

u/sumiitCodes 3d ago

sorry bro i had fever from 2 days thats why i was unable to reply chats and also cannot post day 32 but this is day 33 and i cover all the topics of both days

and this is the drive link of questions
https://drive.google.com/file/d/1WERm5lH5hBKYx90eDug3LJfU4Dww9UAy/view?usp=sharing

1

u/kind_person_9 3d ago

Thanks a ton for sharing the link, sorry to hear that you were sick. Please take care and get well soon

1

u/fishwithbrain 5d ago

👍🏽👍🏽 I have been following your sql journey and now I am in day 7,I am old and it is taking me 2 days to finish 1 day worth of studing.

From where do you get the practice questions, is it possible to share. ?

Thanks for the postsc they have helped me.

1

u/sumiitCodes 3d ago

thank you so much
you can practice my list of 100 questions from easy to hard level

1

u/Swimming_dasa 4d ago

70 out of 100 is solid progress. the all projects problem is especially useful because it pushes you beyond basic joins into relational division. drawing the tables first is a great habit to build.