VETER└-2 MASCUL═

SELECT nom as sujeto, dni as doc, sexe as sex1, categoria as cate, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=221 AND dni=doc ),0) AS una, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=222 AND dni=doc ),0) AS dos, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=223 AND dni=doc ),0) AS tres, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=224 AND dni=doc ),0) AS quatre, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=225 AND dni=doc ),0) AS cinc, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=226 AND dni=doc ),0) AS sis, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=227 AND dni=doc ),0) AS siet, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=228 AND dni=doc ),0) AS vuit, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=229 AND dni=doc ),0) AS nou, SUM(puntscat) AS punts, SUM(empat) as desempat FROM historic5 WHERE categoria="VE2 M" GROUP BY dni ORDER BY punts DESC, desempat ASC..
Pos Nom AmpostaAmpollaPerellˇCamarlesTortosaJes˙sDeltebreL'Aldea Total Punts
1 GARCIA REDONDO, DOMINGO 11510310300000 321 321
2 ALMENDROS RODA, IGNASI 93738500000 251 251
3 SEDIKI AIT SILARBI, HAKIM 75797900000 233 233
4 SANAHUJA BARRANCO, JOSEP RAMON 011511500000 230 230
5 GALARZA SANCHEZ, ALEJANDRO 73717500000 219 219
6 BERTOMEU BAILE, DAVID 10393000000 196 196
7 VALENCIA, MANUEL 009300000 93 93
8 ALONSO QUESADA, OSCAR 085000000 85 85
9 FERRE FOLCH, DAVID 850000000 85 85
10 PALMER FERRER, PERE 790000000 79 79
11 RIBES SERRA, JOSEP MARIA 075000000 75 75
12 SOL╔ SUBIRATS, JULI 710000000 71 71
13 ARASA FORNOS, OSCAR 070000000 70 70