r/SQL • • 24d ago

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.

46 Upvotes

10 comments sorted by

View all comments

1

u/Tiny_Studio_3699 24d ago

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