How to retrieve required data only when sorted on multiple Order by?

I’m new to BASE and SQL. I have a table with fields for Group, Strategy, Profit, Success_Ratio. Each strategy is unique and a member of a group, there are 10 groups in total, but in excess of a 1000 strategies. Each Strategy has a level of profit achieved and a Success Ratio (which is calculated in a separate programme)

Within each group I want to know which strategy has the highest Success_Ratio, and just return these 10 results for the query.

Using ORDER_BY and LIMIT has enabled me to sort by Group and then by success Ratio but the LIMIT is applied to the first records returned which are all in the same Group. Is there a way of generating a query which will only find the top performing strategy from each group possibly by using a nested search or some other technique completely?

Many thanks


A bit difficult to conceptualise your data structure, and additionally when you write “just return these 10 results” from the query - which 10 results ? The top 10 success ratio values for eahc group, or each strategy ? Your question would probably be better asked on a SQL specific mailing list / discussion forum.