No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I am trying to create a mysql query that groups people and the ranks them. I use the following to rank them without the grouping and get that result: SELECT rank, performance, wind,athlete,dob,prov,pos,place,date FROM (SELECT performance, wind,name,surname,dob,prov,pos,place,date, @curRank := IF(@prevRank = performance, @curRank, @incRank) AS rank, @incRank := @incRank + … | |
I am using the following mysql query: CREATE TEMPORARY TABLE temp_table ENGINE=MyISAM AS (SELECT age, performance, wind,name,surname,dob,prov,pos,place,date, @curRank := IF(@prevRank = performance, @curRank, @incRank) AS rank, @incRank := @incRank + 1, @prevRank := performance, CONCAT(name,' ',surname) AS 'athlete' FROM results p, ( SELECT @curRank :=0, @prevRank := NULL, @incRank := … |