Skip to main content

Results

[dbo.results]

Column nameKeyData typeAllow NULLsDefaultDescription
resultIdPrimary KeyINT IDENTITY
resultTypeIdFK_Results_ResultTypeID (dbo.resultType resultTypeID)INTResult Type E.G. Sprint Result
raceIdINTForeign key link to races table
numberINTDriver number
gridINT0Starting grid position
positionINTOfficial classification, if applicable
positionOrderINT0Driver position for ordering purposes
pointsFLOAT0Driver points for race
lapsINT0Number of completed laps
millisecondsINTFinishing time in milliseconds
fastestLapINTLap number of fastest lap
rankINT0Fastest lap rank, compared to other
statusIdINT0Fastest lap speed (km/h) e.g. "213.874"
positionTextIDINTForeign Key link to positionText
fastestLapTimeTIMEFastest lap time e.g. "1:27.453"
fastestLapSpeedDECIMALFastest lap speed (km/h) e.g. "213.874"
timeTIMEFinishing time or gap

Table Relationships

Results

Where Used

Where is this table referenced and what columns are used? The below table shows that information.

[dbo.results]

Parent_schemaNameParent_tableNameParent_columnNameSchematablecolumnconstraint_name
dboresultsresultIddboresultDriverConstructorresultIDPK_resultDriverConstructor_resultID

Example Query

SELECT 
r.[resultId]
,rt.resultTypeId AS [result_type]
,ra.name AS [race_name]
,sea.year
,CONCAT(d.forename, ' ',d.surname) AS [driver_name]
,c.name AS [constructor]
,r.[number]
,[grid]
,[position]
,[positionOrder]
,[points]
,[laps]
,r.[time]
,[milliseconds]
,[fastestLap]
,r.rank
,[fastestLapTime]
,s.status
,pt.positionText
FROM
[dbo].[results] r

INNER JOIN [dbo].[resultType] rt
ON r.resultTypeID = rt.resultTypeID

INNER JOIN [dbo].[races] ra
ON r.raceId = ra.raceId

INNER JOIN [dbo].[raceDriverConstructor] rc
ON rc.resultID = r.resultID

INNER JOIN [dbo].[constructors] c
ON c.constructorId = rc.constructorID

INNER JOIN [dbo].[drivers] d
ON d.driverId = rc.driverId

LEFT JOIN [dbo].[status] s
ON s.statusId = r.statusId

LEFT JOIN [dbo].[positionText] pt
ON pt.positionTextID = r.positionTextID

INNER JOIN [dbo].[seasons] sea
ON sea.year = ra.year
WHERE
ra.year = '2023'
AND ra.name = 'British Grand Prix'

Example Output

resultIdresultTypeIdraceIddriverIdconstructorIdnumbergridpositionpositionOrderpointslapsmillisecondsfastestLaprankstatusIdpositionTextIDfastestLapTimefastestLapSpeedtime
11181122111105856906163921100:01:27.452218.30001:34:50.616
21822352285856960944131200:01:27.739217.58600:00:05.477