r/SQL • u/Plus_Kiwi_2592 • Oct 20 '26
MySQL COUNT() vs COUNT() OVER()
I've found this query as a solution to the famous Pizza Runner case study, and I am stuck at figuring out what COUNT() returns, compared to COUNT() OVER().
I know OVER() does the count (or whatever aggregation) over the entire dataset, but idk I'm just not getting the percentage part of this query.
Help :)
25
Upvotes
View all comments
6
u/jacquesrk oracle Oct 21 '26
To find the volume of pizzas ordered, wouldn't you need to know the diameter and thickness of the pizzas?