21.10
10.10
9.10
10.10
27.9
3.10
9.10
18.9
2.10
17.10
2.10
18.9
16.10
10.10
14.10
30.9
30.9
16.10
16.10
16.10
3.10
17.10
14.10
9.10
3.10
10.10
17.10
17.10
16.10
16.10
3.10
26.9
13.10
7.10
14.10
9.10
28.8
6.10
9.10
13.10
9.10
9.10
9.10
12.10
9.10
19.9
12.10
10.10
10.10
9.10
10.10
3.10
10.10
10.10
10.10
10.10
10.10
10.10
10.10
10.10
10.10
9.10
9.10
3.10
30.9
10.10
25.9
13.9
27.9
19.9
9.10
3.10
26.9
9.10
7.10
7.10
6.10
10.10
9.10
9.10
9.10
7.10
7.10
30.9
9.10
9.10
2.10
2.10
26.9
26.9
5.10
2.10
2.10
3.10
2.10
26.9
29.9
27.9
22.9
20.9
Arena: Rimnersvallen
Tävlande: 0 (0+0)   Starter: 0 (0+0)


select distinct results07.*, womenpbestsweden.BB AS PBwomen, womensbestsweden.BB AS SBwomen, CASE WHEN EventN IN (910, 193) THEN EventN+RealMetres/100 ELSE EventN END AS RealEventN, RealEventN AS RealEventN2, '' AS SM, countries.Countryfull, Events.Event AS eventry, results07.Ind AS Indiiy, results07.ID AS ID, results07.ID AS IDI, Events.TF AS type, results07.eventname AS en2, results07.Country AS RealCountry, IF(EndDate Is Null,'',CONCAT(DAYOFMONTH(results07.Date),' ')) AS Datti1, IF(EndDate Is Null,'',substring(Monthname(results07.Date),1,3)) AS Datti2, Round.Roundname, Events.Eventname, Pos.PosName, Sex.Sexi, CASE WHEN results07.AGO IN (12,15) THEN b.AGName ELSE a.AGName END AS AGName, CASE WHEN results07.AGO IN (12,15) THEN b.AGO ELSE a.AGO END AS agoo, `2010`.irrelagularities.Irrname, CASE WHEN results07.Sex = 1 THEN `2010`.menwl.BB ELSE `2010`.womenwl.BB END AS WL, CASE WHEN results07.Sex = 1 THEN `2010`.menwl.Standing ELSE `2010`.womenwl.Standing END AS Standingi, CASE WHEN results07.Date<=Club10end THEN Club10 WHEN results07.Date<=Club9end THEN Club9 WHEN results07.Date<=Club8end THEN Club8 WHEN results07.Date<=Club7end THEN Club7 WHEN results07.Date<=Club6end THEN Club6 WHEN results07.Date<=Club5end THEN Club5 WHEN results07.Date<=Club4end THEN Club4 WHEN results07.Date<=Club3end THEN Club3 WHEN results07.Date<=Club2end THEN Club2 ELSE sweclubsat.Club END AS RealClub, posswe.PosName AS posswe, combinedmen.eventno AS combM, combinedwomen.eventno AS combW FROM results07 LEFT JOIN `2010`.sweclubsat ON sweclubsat.ID=results07.ID AND CASE WHEN results07.Sex=1 and (results07.secondarypos not rlike ('K|F') or results07.secondarypos is null) THEN sweclubsat.gender='M' ELSE sweclubsat.gender='W' END LEFT JOIN (SELECT events.*, eventsext.Orderi AS RealEventN FROM events LEFT JOIN `2010`.eventsext ON events.Event=eventsext.Event) AS Events ON CAST(results07.EventN AS UNSIGNED) = Events.Orderi LEFT JOIN Sex ON results07.Sex = Sex.Sex LEFT JOIN Comp ON results07.CID = Comp.CID LEFT JOIN AG as a ON results07.AGO = a.AGO LEFT JOIN AG as b ON results07.Points = b.AgeGroup LEFT OUTER JOIN Pos ON results07.PosOrderg = Pos.Orderi LEFT OUTER JOIN Round ON results07.Round = Round.Ro LEFT JOIN `2010`.irrelagularities ON `2010`.irrelagularities.Irr = results07.Irr LEFT JOIN `2010`.menwl ON `2010`.menwl.iid = results07.iid LEFT JOIN `2010`.womenwl ON `2010`.womenwl.iid = results07.iid LEFT JOIN world.countries ON results07.Country=countries.Country LEFT JOIN results.posswe ON results07.PosOrderg = posswe.Orderi LEFT JOIN `2010`.combinedmen ON results07.IID=combinedmen.parentid AND results07.Sex=1 LEFT JOIN `2010`.combinedwomen ON results07.IID=combinedwomen.parentid AND results07.Sex=2 LEFT JOIN `2010`.womenpbestsweden ON results07.iid=womenpbestsweden.iid AND (results07.Sex=2 OR results07.secondarypos rlike ('K|F')) AND womenpbestsweden.Roundi IS NULL LEFT JOIN `2010`.womensbestsweden ON results07.iid=womensbestsweden.iid AND (results07.Sex=2 OR results07.secondarypos rlike ('K|F')) AND womensbestsweden.Roundi IS NULL WHERE results07.CID= 12974996 AND `2010`.womenwl.Roundi IS NULL AND `2010`.menwl.Roundi IS NULL ORDER BY Sex, CASE WHEN results07.AGO=15 THEN COALESCE(agoo,0)+100000 ELSE agoo END, combM, combW, RealEventN2, RealEventN, CASE WHEN results07.AGO=12 THEN 999999 ELSE results07.AGO END, results07.Round, Posorderg, CASE WHEN Remarks Is Not Null THEN CASE WHEN Pos1>0 THEN 2 ELSE 3 END ELSE CASE WHEN Pos1>0 THEN 0 ELSE 1 END END, CASE WHEN Pos1 IS NOT NULL THEN Pos1 ELSE 999999 END, SortResult, RealMetres DESC