SUB-23 MASCUL═

SELECT nom as sujeto, dni as doc, sexe as sex1, categoria as cate, IFNULL((SELECT puntscat FROM historic WHERE idcursa=130 AND dni=doc ),0) AS una, IFNULL((SELECT puntscat FROM historic WHERE idcursa=131 AND dni=doc ),0) AS tres, IFNULL((SELECT puntscat FROM historic WHERE idcursa=132 AND dni=doc ),0) AS dos, IFNULL((SELECT puntscat FROM historic WHERE idcursa=133 AND dni=doc ),0) AS quatre, IFNULL((SELECT puntscat FROM historic WHERE idcursa=134 AND dni=doc ),0) AS cinc, IFNULL((SELECT puntscat FROM historic WHERE idcursa=135 AND dni=doc ),0) AS sis, IFNULL((SELECT puntscat FROM historic WHERE idcursa=136 AND dni=doc ),0) AS siet, IFNULL((SELECT puntscat FROM historic WHERE idcursa=137 AND dni=doc ),0) AS vuit, IFNULL((SELECT puntscat FROM historic WHERE idcursa=138 AND dni=doc ),0) AS nou, IFNULL((SELECT puntscat FROM historic WHERE idcursa=139 AND dni=doc ),0) AS deu, SUM(puntscat) AS punts, SUM(empat) as desempat FROM historic WHERE categoria="S23 M" GROUP BY dni ORDER BY punts DESC, desempat ASC..
Pos Nom AmpostaL'AmpollaUlldeconaPerellˇS.BÓrbaraCamarlesTortosaDeltebreLa GaleraJes˙s Total Punts
1 RIERA I CAIRE, ALBERT 931030115000000 311 311
2 ABAGHAD, YOUSSEF 11511500000000 230 230
3 PONS TOM└S, RAMON 1039300000000 196 196
4 TOM└S GIN╔, GUILLEM 0791030000000 182 182
5 VIDIELLA CURTO, SERGI 798500000000 164 164
6 MARZA PLA, XAVI 001150000000 115 115
7 PONS ALEMAN, ALEX 00930000000 93 93
8 BELTRAN MARTINEZ-AGUADO, RAMON 85000000000 85 85
9 RAMON FARGA, └NGEL 75000000000 75 75