SČNIOR 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 dos, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=222 AND dni=doc ),0) AS una, 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, SUM(puntscat) AS punts, SUM(empat) as desempat FROM historic5 WHERE categoria="SEN M" GROUP BY dni ORDER BY punts DESC, desempat ASC..
Pos Nom AmpollaPerellóCamarlesTortosaDeltebreJesús Total Punts
1 TOMŔS BUITRAGO, AITOR 01151151151150 460 460
2 ROCA REY, ROGER 9375690730 310 310
3 ALCOVERRO FABREGAT, LEO 1037970000 252 252
4 GOMEZ AUSACH, ANDREU 115850000 200 200
5 CABALLÉ ANDREU, ENRIC 093001030 196 196
6 ESTORACH SOL, OSCAR 009310300 196 196
7 MATAMOROS, SERGI 00085930 178 178
8 OBIOL PEDROL, ENRIC 00079790 158 158
9 SOWE , MUSA 01030000 103 103
10 COVAS DOMENECH, KEVIN 00103000 103 103
11 ANTÚNEZ TIRADO, JOSE 0009300 93 93
12 HERNANDEZ GARRIDO, GERARD 0085000 85 85
13 SABORIDO ESCURRIOLA, GENÍS 0000850 85 85
14 GOLENEVA, ASYA 8500000 85 85
15 MACHI CABALLE, OMAR 0079000 79 79
16 BERTOMEU BELLES, CRISTIAN 0075000 75 75
17 MIRO JUAN, ALBERT 0000750 75 75
18 MONLLAO FERRE, PAU 0073000 73 73
19 MECA VENTURA, CARLOS 0071000 71 71
20 GIMENEZ CASANOVA, LLUIS 0000710 71 71
21 PORRES FURIO, CLAUDIO 0000700 70 70
22 DELATORRE FERRE, XAVIER 0000690 69 69
23 MAURI HIERRO, DAVID 0068000 68 68