c# - Getting Top 3 from Mysql table based on Condition/Value -


i need top 3 forwards,top 3 midfielders,top 4 defenders based on soccer players position

i have separate table position

structure of position table

positionid , positionname

1 tor(which means goal keeper)

2 abwehr(which means defenders)

3 mittelfeld(which means midfielders)

4 angriff(which means forwards)

and have soccerplayers table there name(player name),positionid,tscore(player score)

i need top 3 players each position based on tscore

any query suggestion ??

well can try query set:

(select name, positionid, tscore soccerplayers positionid = 1 order tscore limit 3) union (select name, positionid, tscore soccerplayers positionid = 2 order tscore limit 4) union (select name, positionid, tscore soccerplayers positionid = 3 order tscore limit 3) 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -