VETERÀ-1 FEMENÍ

SELECT nom as sujeto, dni as doc, sexe as sex1, categoria as cate, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=221 AND dni=doc ),0) AS una, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=222 AND dni=doc ),0) AS dos, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=223 AND dni=doc ),0) AS tres, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=224 AND dni=doc ),0) AS quatre, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=225 AND dni=doc ),0) AS cinc, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=226 AND dni=doc ),0) AS sis, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=227 AND dni=doc ),0) AS siet, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=228 AND dni=doc ),0) AS vuit, IFNULL((SELECT puntscat FROM historic5 WHERE idcursa=229 AND dni=doc ),0) AS nou, SUM(puntscat) AS punts, SUM(empat) as desempat FROM historic5 WHERE categoria="VE1 F" GROUP BY dni ORDER BY punts DESC, desempat ASC..
Pos Nom AmpostaAmpollaPerellóCamarlesTortosaJesúsDeltebreL'Aldea Total Punts
1 CASTELLS LOPEZ, SUSANA 115115000000 230 230
2 BIARNÉS JORNET, MªDOLORS 93103000000 196 196
3 SÁNCHEZ FIGUERES , MIREIA 10393000000 196 196
4 HERMANO, SORIA 7985000000 164 164
5 FANDOS COLOMINES, ESTIBALIZ 7579000000 154 154
6 DE LA IGLESIA TUDELA, OLYMPIA 7075000000 145 145
7 BONET MONTAGUT, MARIA JOSÉ 6871000000 139 139
8 RODRIGUEZ, KRISTY RENEE 6573000000 138 138
9 MORALES TOMÀS, PATRICIA 6770000000 137 137
10 FRANCH BONET, ROSANA 6669000000 69 135
11 CUGAT ADELL, GEMMA 6468000000 132 132
12 GAUXACHS MARGALEF, NURIA 6267000000 129 129
13 VICO GIL, EVA MARIA 5863000000 121 121
14 GIL MARTI, NEUS 850000000 85 85
15 LABORIA MARGALEF, JOANA 730000000 73 73
16 SALVADOR SUTTON, MARIA EUGENIA 710000000 71 71
17 BLANQUET BAYERRI, MONTSE 690000000 69 69
18 SOLE MONLLAO, NURIA 066000000 66 66
19 BORRAS MARGALEF, CRISTINA 065000000 65 65
20 DE COLSA LORENZO, ROSA 064000000 64 64
21 MESTRE GARCIA, ROSA MARIA 630000000 63 63
22 MONSÓ LAMELAS, NOEMI 610000000 61 61
23 GARRIGA BALAGUÉ, NOELIA 600000000 60 60
24 CECÍLIA GALLEGO , SUSANNA 590000000 59 59
25 BOSCH MONTAÑES, NURIA 570000000 57 57