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 dos, IFNULL((SELECT puntscat FROM historic WHERE idcursa=132 AND dni=doc ),0) AS tres, 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, IFNULL((SELECT puntscat FROM historic WHERE idcursa=140 AND dni=doc ),0) AS once, 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àrbaraCamarlesTortosaJesúsDeltebreLa GaleraL'Aldea Total Punts
1 OUHDADI, YASSINE 1150000000000 115 115
2 MENDEZ PRUNERA, ALEX 1030000000000 103 103
3 FATHI, ALI 930000000000 93 93
4 MARTOS MARTI, JOAN 850000000000 85 85
5 SALES FERRE, ENRIC 790000000000 79 79
6 TRESO MASCARELL, MARC 750000000000 75 75
7 CURTO ARAGONÉS, MARC 730000000000 73 73
8 RENALES PRIETO, ALEJANDRO 710000000000 71 71
9 RODA JIMENEZ, JOSEP 700000000000 70 70
10 MARIN MARIN, DANIEL 690000000000 69 69
11 GIMENEZ BELLOBI, JORDI 680000000000 68 68
12 GOMBAU MURRIA, ELISEU 670000000000 67 67
13 PELLICER MARTINEZ, DANI 660000000000 66 66
14 GAUXACHS FONT, DAVID 650000000000 65 65
15 PLA ALONSO, SERGI 640000000000 64 64
16 GAIC, ROBERT DAVID 630000000000 63 63
17 BERTOMEU CURTO, JOEL 620000000000 62 62
18 GIMENEZ CASANOVA, LLUIS 610000000000 61 61
19 PARIS BRETÓ, GUILLERMO 600000000000 60 60
20 GELLIDA BELMONTE, RUBEN 590000000000 59 59
21 FERRE LOPEZ, CARLOS 580000000000 58 58
22 BAIGET FARRÉ, JAUME 570000000000 57 57
23 MULET AGUILÓ , GERARD VICENT 560000000000 56 56
24 VENTURA GILABERT, SERGI 550000000000 55 55