0

I have a MySQL table of the following format:

id|typeID|mu|sigma

typeID will have a few (<15) unique values (eg. 474,475,10421)

I'm trying to grab the top 3 highest mu values of the table of each unique typeID

An example:

1|101|1001|1|
2|101|1002|1|
3|103|1003|1|
4|103|1004|1|
5|105|1005|1|
6|101|1006|1|
7|101|1007|1|
8|103|1008|1|
9|103|1009|1|
10|105|1010|1|
11|101|1015|1|
12|101|1014|1|
13|103|1013|1|
14|103|1012|1|
15|105|1011|1|

The query should return

11|101|1015|1|
12|101|1014|1|
7|101|1007|1|
13|103|1013|1|
14|103|1012|1|
9|103|1009|1|
15|105|1011|1|
10|105|1010|1|
5|105|1005|1|

I have tried a couple of query's but nothing seems to pull what I'm looking for. Any help is appreciated from a MySQL noob!

0 Answers0