MÀSTER-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="MA1 M" GROUP BY dni ORDER BY punts DESC, desempat ASC..
Pos Nom AmpostaL'AmpollaUlldeconaPerellóS.BàrbaraCamarlesTortosaDeltebreLa GaleraJesús Total Punts
1 SANCHO JOSE, VICTOR 1150115103798593931030 786 786
2 FUCHO PASCUAL, FELIP 0115011585931031030103 717 717
3 CID ESPUNY, JOSEP LLUIS 103103075757585858593 779 704
4 MARGALEF BORRELL, JOSEP 93939373717379797979 812 683
5 BROUGHTON, JIM 8579797173717068730 669 601
6 FUMADO CASANOVA, JUAN JOSE 0850707070730075 443 443
7 ALIAU PONS, JOAN JOSEP 7171736606906900 419 419
8 TOMÀS TORRES, ISMAEL 0750696600706870 418 418
9 HERNANDEZ RODRIGUEZ, CARLOS 736806706869000 345 345
10 MORENO GALLARDO, JOSE LUIS 0000115103001150 333 333
11 MILLAN MASDEU, JOAN IGNASI 75737500068000 291 291
12 LANGE EBRI, ARTURO 00000071717173 286 286
13 CHAVARRIA ARAGONES, JOAN 00006700736971 280 280
14 PONS URQUIZU, JOSE MARIA 0085000750085 245 245
15 MIRO ANDREU , ANTONI 00000001150115 230 230
16 SOLE CRESPI, JOSEP 00001031150000 218 218
17 MARINE OLLE, PACO 0010385000000 188 188
18 ARASA ARASA, JUAN JOSE 000069000700 139 139
19 FOLCH, JOSEP MARIA 000686500000 133 133
20 ALBACAR GARCIA, MARCEL 000000115000 115 115
21 SABATER, JOSEP MARIA 00009300000 93 93
22 BELDA SÁNCHEZ, AGUSTÍ 00093000000 93 93
23 GONZALEZ REVERTER, RAMON 00000000930 93 93
24 LLITRÀ VIRGILI, ESTEVE 00000790000 79 79
25 FRANCH PINYOL, NARCIS 00079000000 79 79
26 ALBESA ARASA, JOAN 79000000000 79 79
27 ANDREU FERRANDO, XAVIER 00000000750 75 75
28 FUMADÓ FORNÓS, JUAN JOSÉ 00000007500 75 75
29 SOMMES, ANDREAS 07000000000 70 70
30 NAUMBURGER, KLAUS 06900000000 69 69
31 ROCA ALGUERÓ, JOAN 00006800000 68 68
32 BRETO PARIS, JOSE GREGORIO 00000000670 67 67