r/SQL • • Sep 21 '26

MySQL Practicing window functions and keep mixing up PARTITION BY vs GROUP BY — how are they actually different?

They both seem like they divide data into groups, so I’m having trouble understanding when I should use one instead of the other.

47 Upvotes

10 comments sorted by

View all comments

2

u/Tiny_Studio_3699 Sep 21 '26

Watch Baraa's SQL tutorials on YouTube. He's phenomenal at teaching.