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 una, IFNULL((SELECT puntsgen FROM historic5 WHERE idcursa=222 AND dni=doc ),0) AS dos, 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, IFNULL((SELECT puntsgen FROM historic5 WHERE idcursa=227 AND dni=doc ),0) AS siet, IFNULL((SELECT puntsgen FROM historic5 WHERE idcursa=228 AND dni=doc ),0) AS vuit, IFNULL((SELECT puntsgen FROM historic5 WHERE idcursa=229 AND dni=doc ),0) AS nou, SUM(puntsgen) AS punts, SUM(empat) as desempat FROM historic5 WHERE sexe="M" GROUP BY dni ORDER BY punts DESC, desempat ASC..
Pos Nom Cat. AmpostaAmpollaPerellóCamarlesTortosaJesúsDeltebreL'Aldea Total Punts
1 TOMÀS BUITRAGO, AITOR SEN M1150000000 115 115
2 ESTORACH SOL, OSCAR SEN M1030000000 103 103
3 MACHI CABALLE, OMAR SEN M930000000 93 93
4 COLI MUNAR, PERE S23 M850000000 85 85
5 GARCIA REDONDO, DOMINGO VE2 M790000000 79 79
6 RIERA I CAIRE, XAVIER S18 M750000000 75 75
7 RODRIGUEZ SUBIRATS, DAVID VE1 M730000000 73 73
8 CAMPOY LOZANO, JUAN VE1 M710000000 71 71
9 FUCHO PASCUAL, FELIP MA1 M700000000 70 70
10 CÁCERES AZNAR, KARIM SEN M690000000 69 69
11 GOMEZ AUSACH, ANDREU SEN M680000000 68 68
12 BERTOMEU BAILE, DAVID VE2 M670000000 67 67
13 ALMENDROS RODA, IGNASI VE2 M660000000 66 66
14 LUQUE LLUCH, OLIVER VE1 M650000000 65 65
15 LLUCH ARBONA, FRANCESC VE1 M640000000 64 64
16 TORREBLANCA CERVELLÓ, JOSE ANGEL VE1 M630000000 63 63
17 ORTEGA BLANCO, JAIME VE1 M620000000 62 62
18 LLUIS LLANSAMA, ANTONIO VE1 M610000000 61 61
19 FERRE FOLCH, DAVID VE2 M600000000 60 60
20 PALMER FERRER, PERE VE2 M590000000 59 59
21 SEDIKI AIT SILARBI, HAKIM VE2 M580000000 58 58
22 BALAGUE BELTRAN, JOAQUIN VE1 M570000000 57 57
23 BERTOMEU CASANOVA, AARON SEN M560000000 56 56
24 GONZALEZ REVERTER, RAMON MA1 M550000000 55 55
25 GALARZA SANCHEZ, ALEJANDRO VE2 M540000000 54 54
26 VECIANA CARBONELL, JOSEP VE1 M530000000 53 53
27 MARGALEF BORRELL, JOSEP MA1 M520000000 52 52
28 ROCA REY, ROGER SEN M510000000 51 51
29 MARTÍ JOVE, JOSEP MA1 M500000000 50 50
30 SAMPER BRUNO, ALBERT VE1 M490000000 49 49
31 GARRIGA SANZ, ANTONI VE1 M480000000 48 48
32 SOLÉ SUBIRATS, JULI VE2 M470000000 47 47