MySQL Forums
Forum List  »  Newbie

Re: Best way to get top 3 sales categories from a database
Posted by: Peter Brawley
Date: January 04, 2022 01:44PM

The top-3 columns might be got a bit more easily with a pivot table/crosstab on the top cte, see that topic at https://www.artfulsoftware.com/queries.php ... finding out which is more efficient will require running Explain Analyze on each query and optimising with covering indexes.

Options: ReplyQuote


Subject
Written By
Posted
Re: Best way to get top 3 sales categories from a database
January 04, 2022 01:44PM


Sorry, only registered users may post in this forum.

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.