Results Navigation
Use the controls below to drill down into these results
|
|
Mar
27
2010
|
Big Cow Duathlon 2 - 2010 (4.5km run/16km bike/4.2km run)
|
Rate this information
| Not rated |
| No feedback available for this area |
WITH resultSet AS (SELECT Results.ResultId FROM Results WITH (NOLOCK) WHERE Results.RaceId=954)
, spt10759 AS (SELECT Splits.ResultId, Splits.SplitId, Splits.Duration, Splits.RaceSplitId, Splits.Placing AS SplitRank FROM Splits WITH (NOLOCK) INNER JOIN ResultSet WITH (NOLOCK) ON resultSet.ResultId=Splits.ResultId WHERE Splits.RaceSplitId=10759 And Splits.Duration Is Not NULL), spt10760 AS (SELECT Splits.ResultId, Splits.SplitId, Splits.Duration, Splits.RaceSplitId, Splits.Placing AS SplitRank FROM Splits WITH (NOLOCK) INNER JOIN ResultSet WITH (NOLOCK) ON resultSet.ResultId=Splits.ResultId WHERE Splits.RaceSplitId=10760 And Splits.Duration Is Not NULL), spt10761 AS (SELECT Splits.ResultId, Splits.SplitId, Splits.Duration, Splits.RaceSplitId, Splits.Placing AS SplitRank FROM Splits WITH (NOLOCK) INNER JOIN ResultSet WITH (NOLOCK) ON resultSet.ResultId=Splits.ResultId WHERE Splits.RaceSplitId=10761 And Splits.Duration Is Not NULL), spt10762 AS (SELECT Splits.ResultId, Splits.SplitId, Splits.Duration, Splits.RaceSplitId, Splits.Placing AS SplitRank FROM Splits WITH (NOLOCK) INNER JOIN ResultSet WITH (NOLOCK) ON resultSet.ResultId=Splits.ResultId WHERE Splits.RaceSplitId=10762 And Splits.Duration Is Not NULL), spt10763 AS (SELECT Splits.ResultId, Splits.SplitId, Splits.Duration, Splits.RaceSplitId, Splits.Placing AS SplitRank FROM Splits WITH (NOLOCK) INNER JOIN ResultSet WITH (NOLOCK) ON resultSet.ResultId=Splits.ResultId WHERE Splits.RaceSplitId=10763 And Splits.Duration Is Not NULL), spt10764 AS (SELECT Splits.ResultId, Splits.SplitId, Splits.Duration, Splits.RaceSplitId, Splits.Placing AS SplitRank FROM Splits WITH (NOLOCK) INNER JOIN ResultSet WITH (NOLOCK) ON resultSet.ResultId=Splits.ResultId WHERE Splits.RaceSplitId=10764 And Splits.Duration Is Not NULL)
SELECT
ROW_NUMBER() OVER( ORDER BY CASE WHEN Placing IS NULL THEN 1 ELSE 0 END, Placing ASC
, CASE WHEN Finish IS NULL THEN 1 ELSE 0 END, Finish ASC
) AS RowNumber ,ISNULL(Results.Status,'') AS Status
,ISNULL(Results.Laps,0) AS Laps
,Results.Firstname
,Results.Lastname
,Results.Firstname + ' ' + Results.Lastname AS Competitor
,Results.RaceNumber
,ISNULL(Results.Category, '') AS Category
,ISNULL(Results.Team,'') AS Team
,ISNULL(Results.Club, '') AS Club
,Results.Gender
,Gender.Keyword AS GenderStr
,Results.ResultId
,Results.Placing
,Results.RaceId
,Events.EventManagerId
,ISNULL(Results.Notes,'') AS Notes
,'' AS StaticData, spt10759.Duration AS [Splt_10759]
, spt10760.Duration AS [Splt_10760]
, spt10761.Duration AS [Splt_10761]
, spt10762.Duration AS [Splt_10762]
, spt10763.Duration AS [Splt_10763]
, spt10764.Duration AS [Splt_10764]
FROM Results WITH (NOLOCK) INNER JOIN Races WITH (NOLOCK) ON Races.RaceId=Results.RaceId INNER JOIN resultSet WITH (NOLOCK) ON resultSet.ResultId=Results.ResultId INNER JOIN Events WITH (NOLOCK) ON Events.EventId=Races.EventId
LEFT OUTER JOIN Keywords Gender WITH (NOLOCK) ON Gender.KeywordId=Results.Gender AND Gender.Language='English' AND Gender.GroupName='Gender'
LEFT OUTER JOIN spt10759 WITH (NOLOCK) ON spt10759.ResultId=Results.ResultId
LEFT OUTER JOIN spt10760 WITH (NOLOCK) ON spt10760.ResultId=Results.ResultId
LEFT OUTER JOIN spt10761 WITH (NOLOCK) ON spt10761.ResultId=Results.ResultId
LEFT OUTER JOIN spt10762 WITH (NOLOCK) ON spt10762.ResultId=Results.ResultId
LEFT OUTER JOIN spt10763 WITH (NOLOCK) ON spt10763.ResultId=Results.ResultId
LEFT OUTER JOIN spt10764 WITH (NOLOCK) ON spt10764.ResultId=Results.ResultId
ORDER BY CASE WHEN Placing IS NULL THEN 1 ELSE 0 END, Placing ASC
, CASE WHEN Finish IS NULL THEN 1 ELSE 0 END, Finish ASC
|