VETERÀ-1 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="VE1 M" GROUP BY dni ORDER BY punts DESC, desempat ASC..
Pos Nom AmpostaL'AmpollaUlldeconaPerellóS.BàrbaraCamarlesTortosaDeltebreLa GaleraJesús Total Punts
1 MAS CACERES, LLUISMA 115115103115000000 448 448
2 ALEMANY SEBASTIA , SAMUEL 10310393103000000 402 402
3 OLIVA SIMÓ, JUAN JOSÉ 69698585000000 308 308
4 SOTA MARTÍ, JORDI 79757379000000 306 306
5 CASTELLS LOPEZ, RAMON 70687571000000 284 284
6 CURTO I GILABERT, DAVID 67656868000000 268 268
7 PAGA MARGALEF, JOAN PERE 65616769000000 262 262
8 PRINCEP CARDONA, JESUS 7579093000000 247 247
9 ZARAGOZA VALLDEPEREZ, RAMON 59576664000000 246 246
10 OLIVA SORIA, ANTONIO 61605461000000 236 236
11 MONTESÓ JIMENEZ, DAVID 57486060000000 225 225
12 SOTOMAYOR DUQUE, XAVI 41516365000000 220 220
13 ALABART ALCOBER, JOSEP MARIA 0707075000000 215 215
14 VALLESPI DE LA CRUZ, JORDI 0677173000000 211 211
15 SEBASTIA VALLDEPEREZ, JORDI 46445863000000 211 211
16 QUERAL FORCADELL, XAVI 0931150000000 208 208
17 ULLDEMOLINS TODÓ, ALFONS 6658070000000 194 194
18 ALIMBAU REVERTE, MIQUEL 0596466000000 189 189
19 LUQUE LLUCH, OLIVER 44424953000000 188 188
20 MARTOS MARTI, ANGEL 0556257000000 174 174
21 CASTELLS FABRA, LLUIS 39374849000000 173 173
22 QUERALT ROIG, DANI 5852062000000 172 172
23 ROMEU ESQUERRÉ, FERNANDO 5050610000000 161 161
24 DELLA CALLEN, JUAN JOSE 5249590000000 160 160
25 MARGALEF JORNET, PERE 737300000000 146 146
26 CÓZAR TORÁN, PEDRO 686600000000 134 134
27 LLEIXA GUARRO, IVAN 640650000000 129 129
28 FERNANDO ROYAL, JOSEP ENRIC 550056000000 111 111
29 CID MESEGUER, SIMON 565300000000 109 109
30 MARTIN ARASA, JOSEP 540054000000 108 108
31 BALAGUE BELTRAN, JOAQUIN 470570000000 104 104
32 REVERTER BULLON, JOSE MIGUEL 450510000000 96 96
33 BELLART SANS, MIQUEL 93000000000 93 93
34 MARTI GUARI, DAVID 420051000000 93 93
35 SERRET GOMEZ, JUAN CARLOS 039500000000 89 89
36 GRUESO OTALO, ANTONIO 85000000000 85 85
37 SORIANO LÓPEZ, MARTÍ 08500000000 85 85
38 CUGAT MULET, JAUME 434100000000 84 84
39 NOU CASTELL, RAMON 00790000000 79 79
40 ALBESA ABADAL, ANDRES 71000000000 71 71
41 GAS PANISELLO, DAVID 07100000000 71 71
42 RODRIGUEZ SUBIRATS, DAVID 00690000000 69 69
43 MARGALEF BENAIGES, PAU 00067000000 67 67
44 ESCUDERO COROMINES, DANI 06400000000 64 64
45 DUEÑAS RODRIGUEZ, ALBERTO 06300000000 63 63
46 ASÍN QUEROL, JAVI 63000000000 63 63
47 LOPEZ GIL, DENIS 62000000000 62 62
48 FERNANDEZ FUERTES, ALEX 06200000000 62 62
49 MORENO GARCIA, JUAN 60000000000 60 60
50 JUANPERE POBLET, MANEL 00059000000 59 59
51 MARGALEF LLAO, TIBURCI ANDREU 00058000000 58 58
52 CALDUCH GARCIA, JUAN 05600000000 56 56
53 RIBAS BEL, ALBERT 00560000000 56 56
54 SUOMINEN, IRRON 00550000000 55 55
55 ALFONSO GOMEZ, SANTIAGO 00055000000 55 55
56 LLUCH ARBONA, DAVID 05400000000 54 54
57 SORIANO LOPEZ, ANTONIO 53000000000 53 53
58 VACHERESSE ORTIZ, STEPHANE 00530000000 53 53
59 CIFRE SOSPEDRA, JOSE ANGEL 00520000000 52 52
60 AZNAR RUIZ, CHRISTIAN 00052000000 52 52
61 ALBA RODRIGUEZ, TONI 51000000000 51 51
62 FANDOS COLOMINES, FELIP 00050000000 50 50
63 ARAGON MORA , FELIP 49000000000 49 49
64 AGUILAR BONAVIDA, ESTEVE 48000000000 48 48
65 ROMERO VILLANUEVA, JUAN CARLOS 04700000000 47 47
66 SANS FERRER, ALBERT 00470000000 47 47
67 CABRÉ, MARIÀ 04600000000 46 46
68 SOTO PAREDES, DANIEL 04500000000 45 45
69 MARINAS VALLS, IVAN 04300000000 43 43
70 TERAN GOMEZ, JOAN 40000000000 40 40
71 ALVAREZ GUTIERREZ, RUBEN 04000000000 40 40
72 PRADES PRADES, JOSEP M. 03800000000 38 38
73 ALVENTOSA LARA, RAFAEL 03600000000 36 36
74 FRANCH BONET, ROSANA 03500000000 35 35