Skip to main content

Lap Times

[dbo.lapTimes]​

Column nameKeyData typeAllow NULLsDefaultDescription
raceIdPrimary KeyINT☐Foreign key link to races table
driverIdPrimary KeyINT☐Lap number
lapPrimary KeyINT☐Lap number
positionINT☑Driver race position
millisecondsINT☑Lap time in milliseconds
timeTIME☑Lap time in milliseconds

Table Relationships​

Lap Times

Where Used​

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

Example Query​

SELECT 
r.[raceId]
,r.name AS [race_name]
,d.[driverId]
,CONCAT(d.forename, ' ',d.surname) AS [driver_name]
,[lap]
,[position]
,lt.[time]
,[milliseconds]
FROM
[dbo].[lapTimes] lt

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

INNER JOIN [dbo].[drivers] d
ON d.driverId = lt.driverId
WHERE
r.year = '2023'
AND r.name = 'Australian Grand Prix'

Example Output​

raceIddriverIdlappositionmillisecondstime
1111310908800:01:49.088
112129374000:01:33.740