Reputation: 87
Could someone explain to me why you have to group two columns together here? Link to page with code etc.
Upvotes: 0
Views: 54
Reputation: 1299
Because you want the highest of unique(customer, date).
If a customer orders twice on Monday and once on Tuesday you want the output to be their highest value order from Monday and their order from Tuesday.
Upvotes: 1