Ask Your Question

Andy_new's profile - activity

2016-02-21 21:12:23 +0200 received badge  Famous Question (source)
2014-07-16 13:35:08 +0200 received badge  Popular Question (source)
2014-07-16 13:35:08 +0200 received badge  Notable Question (source)
2014-05-07 17:00:21 +0200 asked a question 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