Hi,
I want to use Grouping Sets in the Group By statements together with limit, to display only the top 5 entries for each grouping set.
Furthermore the data should be ordered by the amount. However there is no order by which could be applied before the limit clause on the grouping sets. The normal Order By of the SQL statement is only applied on the result of the grouping sets in the last step.
Has anybody an idea, how to retrieve 5 entries for each grouping set, ordered by an amount?
Regards,
Michael