SÈNIOR 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="SEN M" GROUP BY dni ORDER BY punts DESC, desempat ASC..
Pos Nom AmpostaL'AmpollaUlldeconaPerellóS.BàrbaraCamarlesTortosaDeltebreLa GaleraJesús Total Punts
1 COLOMINES CUADRAD, JAUME 931158579000000 372 372
2 GOMBAU MURRIA, ELISEU 70686871000000 277 277
3 PLA ALONSO, SERGI 65696670000000 270 270
4 PELLICER MARTINEZ, DANI 66666573000000 270 270
5 VIUDEZ TOMÀS, MARTÍ 01037975000000 257 257
6 GAIC, ROBERT DAVID 64626365000000 254 254
7 BRET GALI , JORDI 60565958000000 233 233
8 SALES FERRE, ENRIC 7307385000000 231 231
9 AVINYO ARASA, PAU 6967670000000 203 203
10 SUBIRATS CID, JORDI 6158061000000 180 180
11 TRESO MASCARELL, MARC 859300000000 178 178
12 MORILLO PORRAS, DAVID 5560620000000 177 177
13 MORILLO PORRAS, JUAN ANTONIO 5659610000000 176 176
14 ADAM CHAVARRIA, CARLOS 079750000000 154 154
15 RIPOLL BENAIGES, FERRAN 680066000000 134 134
16 FERRÉ, ARNAU CASACUBERTA FERRÉ 064069000000 133 133
17 GONZALEZ GILABERT, OCTAVI 006467000000 131 131
18 PLA SEGURA, EDU 001150000000 115 115
19 GUTIERREZ GARCIA, CRISTIAN 000115000000 115 115
20 MARTOS MARTI, JOAN 115000000000 115 115
21 MONTEVERDE GRAU, GERARD 103000000000 103 103
22 MESTRE QUEROL, ALBERT 001030000000 103 103
23 DURA CREMADES, RICARDO 000103000000 103 103
24 ALSO SELMA, MIQUEL 00093000000 93 93
25 FATHI, ALI 00930000000 93 93
26 SOWE , MUSA 08500000000 85 85
27 ESTORACH SOL, OSCAR 79000000000 79 79
28 MARIN MARIN, DANIEL 75000000000 75 75
29 SUÑER CARLES, PAU 07500000000 75 75
30 REDÓ VIUDEZ, CARLOS 07300000000 73 73
31 GUIMERA FIBLA, CHRISTIAN 00710000000 71 71
32 GIMENEZ BELLOBI, JORDI 71000000000 71 71
33 DOMINGUEZ ARASA, JOSEP 07100000000 71 71
34 ABAT BARRERA, IVAN 00700000000 70 70
35 SABORIDO ESCURRIOLA, EDUARD 07000000000 70 70
36 CASADO, ALEX 00690000000 69 69
37 FIGUERAS MONER, RAMON 00068000000 68 68
38 ESQUERRE, EROS 67000000000 67 67
39 KLESHNIN, VOVOL 06500000000 65 65
40 VERNET FALCÓ, IGNASI 00064000000 64 64
41 PEREZ FRANCH, JOAN 06300000000 63 63
42 CHAVARRIA GARCIA, PERE 63000000000 63 63
43 DOMENECH QUEROL, AITOR 00063000000 63 63
44 CHAVARRIA GARCIA, ENRIC 62000000000 62 62
45 LOPEZ MORENO, CRISTIAN 00062000000 62 62
46 CAMACHO MARGALEF, DAVID 06100000000 61 61
47 CURTO BAIGES, ALBERT 00600000000 60 60
48 SERRAL ZARAGOZA, JOAN 00060000000 60 60
49 ESPINOSA VILLAR, JOSE MANUEL 59000000000 59 59
50 GRAU ROCA, ÀLEX 00059000000 59 59
51 MARGALEF PELEGRIN, JOSEP 58000000000 58 58
52 GOMBAU SOLÉ, CARLOS 00580000000 58 58
53 FONOLLOSA AULADELL, XAVIER 05700000000 57 57
54 VENTURA GILABERT, SERGI 57000000000 57 57
55 MONTOYA LECEGUI, SANTI 05500000000 55 55
56 KONFIDERA, RUDSON 54000000000 54 54
57 SERRET ABELLA, ELOI 05400000000 54 54
58 DELGADO, FRANCESC 53000000000 53 53
59 SERRANO JURADO, DANIEL 05300000000 53 53
60 SEGARRA VICENTE, ALEXANDRE 52000000000 52 52
61 PELLICER ABELLANEDA, DANIEL 05200000000 52 52
62 CARTES REVERTÉ, TONI 51000000000 51 51
63 ALBILLOS BLANCO, JOSÉ LUÍS 50000000000 50 50