Skip to main content

Pit Stops

[dbo.pitStops]​

Column nameKeyData typeAllow NULLsDefaultDescription
raceIdPrimary KeyINT☐
driverIdPrimary KeyINT☐Foreign key link to drivers table
stopPrimary KeyINT☐Stop number
lapINT☐Lap number
timeTIME☐Time of stop e.g. "13:52:25"
millisecondsINT☑Duration of stop in milliseconds
durationDECIMAL☑Duration of stop in milliseconds

Table Relationships​

Pit Stops

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]
,[stop]
,[lap]
,ps.[time]
,[duration]
,[milliseconds]
FROM
[dbo].[pitStops] ps

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

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

Example Output​

raceIddriverIdstoplaptimemillisecondsduration
841111617:28:24.00000002322723.227
841123617:59:29.00000002319923.199