ABSOLUT MASCULÍ

SELECT nom as sujeto, dni as doc, sexe as sex1, categoria as cate, IFNULL((SELECT puntsgen FROM historic5 WHERE idcursa=221 AND dni=doc ),0) AS dos, IFNULL((SELECT puntsgen FROM historic5 WHERE idcursa=222 AND dni=doc ),0) AS una, IFNULL((SELECT puntsgen FROM historic5 WHERE idcursa=223 AND dni=doc ),0) AS tres, IFNULL((SELECT puntsgen FROM historic5 WHERE idcursa=224 AND dni=doc ),0) AS quatre, IFNULL((SELECT puntsgen FROM historic5 WHERE idcursa=225 AND dni=doc ),0) AS cinc, IFNULL((SELECT puntsgen FROM historic5 WHERE idcursa=226 AND dni=doc ),0) AS sis, SUM(puntsgen) AS punts, SUM(empat) as desempat FROM historic5 WHERE sexe="M" GROUP BY dni ORDER BY punts DESC, desempat ASC..
Pos Nom AmpollaPerellóCamarlesTortosaDeltebreJesús Total Punts
1 SANAHUJA BARRANCO, JOSEP RAMON 115930000 208 208
2 GRUESO OTALO, ANTONIO 103850000 188 188
3 GARCIA REDONDO, DOMINGO 93750000 168 168
4 GOMEZ AUSACH, ANDREU 79730000 152 152
5 BALAGUE BELTRAN, JOAQUIN 69660000 135 135
6 ALCOVERRO FABREGAT, LEO 66650000 131 131
7 FUMADO GISBERT, ORIOL 62680000 130 130
8 ROCA REY, ROGER 64620000 126 126
9 MARTÍ JOVE, JOSEP 65610000 126 126
10 TOMÀS BUITRAGO, AITOR 01150000 115 115
11 SOWE , MUSA 01030000 103 103
12 RIERA FLORES, JORDI 8500000 85 85
13 CABALLÉ ANDREU, ENRIC 0790000 79 79
14 SALES CENTELLES, LLUIS 7500000 75 75
15 TRILLO LUCENA, JOSE 7300000 73 73
16 MENENEDEZ GIMENO, ALEX 7100000 71 71
17 CAPTARI, FABIAN 0710000 71 71
18 SUBIRATS MARTÍN, JULIÀ 7000000 70 70
19 ALBACAR CLIMENT, CONRAD 0700000 70 70
20 MAURI GALVE, ALBERT 0690000 69 69
21 POQUET DOMENECH, PAU 6800000 68 68
22 ROCA ALGUERÓ, JOAN 6700000 67 67
23 ALDAO MORELLÓ, ERIC 0670000 67 67
24 ORTEGA BLANCO, JAIME 0640000 64 64
25 WATSON, JAMIE 6300000 63 63
26 PASCUAL VENDRELL, SERGEI 0630000 63 63
27 GOLENEVA, ASYA 6100000 61 61
28 FUSTER GIL, ANGEL LLUIS 0600000 60 60
29 BRULL MARGALEF, JORDI 0590000 59 59
30 GARRIDO LOPEZ, MARCOS 0580000 58 58
31 SAMANIEGO GOMEZ, XAVI 0570000 57 57
32 ALBIAC VIÑOLAS, FERRAN 0560000 56 56
33 GONZÀLEZ CORTINA, OSCAR 0550000 55 55
34 GERARD, DUBENT 0540000 54 54
35 NAVARRO FALCÓ, JOSEP 0530000 53 53