Results Navigation
Use the controls below to drill down into these results
|
|
Jul
25
2010
|
MK Tri 2010 (1500m swim/40k cycle/10k 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=959)
, spt10789 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=10789 And Splits.Duration Is Not NULL), spt10790 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=10790 And Splits.Duration Is Not NULL), spt10791 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=10791 And Splits.Duration Is Not NULL), spt10792 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=10792 And Splits.Duration Is Not NULL), spt10793 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=10793 And Splits.Duration Is Not NULL), spt11854 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=11854 And Splits.Duration Is Not NULL), spt11855 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=11855 And Splits.Duration Is Not NULL), spt10794 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=10794 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, spt10789.Duration AS [Splt_10789]
, spt10790.Duration AS [Splt_10790]
, spt10791.Duration AS [Splt_10791]
, spt10792.Duration AS [Splt_10792]
, spt10793.Duration AS [Splt_10793]
, spt11854.Duration AS [Splt_11854]
, spt11855.Duration AS [Splt_11855]
, spt10794.Duration AS [Splt_10794]
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 spt10789 WITH (NOLOCK) ON spt10789.ResultId=Results.ResultId
LEFT OUTER JOIN spt10790 WITH (NOLOCK) ON spt10790.ResultId=Results.ResultId
LEFT OUTER JOIN spt10791 WITH (NOLOCK) ON spt10791.ResultId=Results.ResultId
LEFT OUTER JOIN spt10792 WITH (NOLOCK) ON spt10792.ResultId=Results.ResultId
LEFT OUTER JOIN spt10793 WITH (NOLOCK) ON spt10793.ResultId=Results.ResultId
LEFT OUTER JOIN spt11854 WITH (NOLOCK) ON spt11854.ResultId=Results.ResultId
LEFT OUTER JOIN spt11855 WITH (NOLOCK) ON spt11855.ResultId=Results.ResultId
LEFT OUTER JOIN spt10794 WITH (NOLOCK) ON spt10794.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
|