I have been trying to sort the result of my SQL query but it's not working properly, I have tried other solutions, but not worked, reference link
My Query
SELECT tournament_entry.TE_club, MAX(tournament_entry.TE_pegion) As TE_pegion,
concat(
floor(SUM(TIME_TO_SEC(tournament_entry.TE_flytime))/3600),':',
floor(SUM( TIME_TO_SEC(tournament_entry.TE_flytime))/60)%60,':',
SUM(TIME_TO_SEC(tournament_entry.TE_flytime))%60) as TE_flytime
FROM tournament_entry
WHERE tournament_entry.TE_tournament = '$Tname'
GROUP BY TE_club
ORDER BY TE_flytime DESC
Point 1, I have used CONCAT(), the reason to display the sum of time greater than 838:59:59 reference link
Step 1 followed,
ORDER BY TE_flytime ASC
results, which is not correct
Step 2 followed,
ORDER BY TE_flytime DESC
results, not correct, in this way it takes results greater than 1000 to the bottom (last), maybe if there is any logic or way to use and it will sort it properly.
Step 3 followed,
ORDER BY 'cast(TE_flytime as float) time'
results, not correct, mixed up all results. reference link
NOTE: I want to sort it in a way that it displays the greatest result on top and so on
e.g
1034:46:0
1027:4:0
965:37:0
809:11:0