VETERÀ-2 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="VE2 M" GROUP BY dni ORDER BY punts DESC, desempat ASC..
Pos Nom AmpostaL'AmpollaUlldeconaPerellóS.BàrbaraCamarlesTortosaDeltebreLa GaleraJesús Total Punts
1 ORTÍN FONT, XAVIER 115115115115115115115000 805 805
2 LLUIS LLANSAMA, GABRIEL 1037910375718579000 595 595
3 PELEGRIN SANCHEZ, JOAN CARLES 71677369676967000 483 483
4 LEON MORA, AUGUSTO LEO 70717168557371000 479 479
5 FORTUÑO NAVARRO, JOSE LUIS 63646867647970000 475 475
6 SEDIKI AIT SILARBI, HAKIM 65696765587066000 460 460
7 RIBES SERRA, JOSEP MARIA 68657063636764000 460 460
8 VALDIVIAS AHUMADA, OSCAR 66686164607168000 458 458
9 VALENCIA, MANUEL 008585799385000 427 427
10 GALARZA SANCHEZ, ALEJANDRO 59605862546561000 419 419
11 SERRET ROIG, ADRIA 6466696666750000 406 406
12 MONTERO PÈREZ, JOSEP MARIA 0001038510393000 384 384
13 LLEIXÀ CHAVARRIA, JOSEP 073797965075000 371 371
14 ALMENDROS RODA, IGNASI 075757070073000 363 363
15 CABRERA CABALLÉ, MARCOS 67706500065000 267 267
16 FIBLA REVERTER, HERMINI 00660626869000 265 265
17 BELTRAN SUBIRATS, JOSEP MARIA 06159615600000 237 237
18 GARCIA SANGÜESA, DAMIÀ 858500000000 170 170
19 GRAU SANZ, MAX 790007300000 152 152
20 ALONSO QUESADA, OSCAR 750005200000 127 127
21 GARCIA DRAGO, JOSEP 610640000000 125 125
22 CAÑÍS SÁNCHEZ, DANIEL 606300000000 123 123
23 DE TORRES BURGOS, FERRAN 000000103000 103 103
24 BALASTEGUI CONTRERAS, FRANCISCO 000010300000 103 103
25 RAMOS ALFONSO, ANTONIO 010300000000 103 103
26 GARCIA REDONDO, DOMINGO 00009300000 93 93
27 SERRA BENEDICTO, JOAN 00093000000 93 93
28 VENTURA CASTELLS, JOAN 09300000000 93 93
29 SANCHEZ LLOPIS, ROBERTO 00930000000 93 93
30 TONDA SALVADO, MANEL 93000000000 93 93
31 ROMERO BELTRAN, ANTONIO 00007500000 75 75
32 GALVE TORRES, JOAN CARLES 00073000000 73 73
33 CAMACHO TEVAS, JOSEP 73000000000 73 73
34 RODES HORTA, GERARD 00071000000 71 71
35 FERRE BALSELLS, RAMON 00006900000 69 69
36 PELLICER DIAZ, JOSEP JOAQUIM 69000000000 69 69
37 BERTOMEU BAILE, DAVID 00006800000 68 68
38 CORRALES ARNAU, RAFEL 00000660000 66 66
39 CUGAT TOMAS, CLAUDIO 00000640000 64 64
40 TORRENT OLLÉ, JORDI 00630000000 63 63
41 TIRON CAMISON, JAUME 00000630000 63 63
42 MASOLLER ARIAS, FRANCESC 00000063000 63 63
43 GRANGÉ GALINDO, JOSEP LLUIS 62000000000 62 62
44 ESPANYA FORCADELL, ANTONI 00620000000 62 62
45 CASTAÑO DE LA ASUNCION, JUAN CARLOS 06200000000 62 62
46 AZNAR LOPEZ, FRANCISCO JOSE 00000620000 62 62
47 NIELSEN, MICHKEL 00000062000 62 62
48 MARÍN GIMÉNEZ, FERNANDO 00006100000 61 61
49 ESPINOSA ZAVALETA, EDGAR RICARDO 00000610000 61 61
50 ALBESA RUBIO, XAVIER 00600000000 60 60
51 MONFORTE GARGALLO, PACO 00060000000 60 60
52 RODA MARTINEZ, SANTIAGO DAVID 00005900000 59 59
53 FORCADELL, DANI 00005700000 57 57
54 FERRÁNDIZ LARRAMONA, JAVIER 00005300000 53 53
55 TAFALLA ANDREU, QUIM 00005100000 51 51