Skip to main content

Pit Stops

[dbo.pitStops]

Column nameKeyData typeAllow NULLsDefaultDescription
raceIdPrimary KeyINT
driverIdPrimary KeyINTForeign key link to drivers table
stopPrimary KeyINTStop number
lapINTLap number
timeTIMETime of stop e.g. "13:52:25"
millisecondsINTDuration of stop in milliseconds
durationDECIMALDuration 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