MySQL Forums
Forum List  »  General

Re: Nested GroupBy or for each
Posted by: Peter Brawley
Date: October 17, 2018 09:41AM

Use an innermost query to pick off the top 4 per campaign, see "Within-group quotas" at https://www.artfulsoftware.com/infotree/qrytip.php.

Within-group quotas are simpler to write with a Windowing function. These funcs came into MySQL with 8.0. What's your MySQL version?

Options: ReplyQuote


Subject
Written By
Posted
October 14, 2018 02:36AM
Re: Nested GroupBy or for each
October 17, 2018 09:41AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.