Skip to main content

Qualifying

[dbo.qualifying]

Column nameKeyData typeAllow NULLsDefaultDescription
qualifyIdPrimary KeyINT
raceIdFK_Qualifying_RaceID (dbo.races raceId)INT0Foreign key link to races table
driverIdFK_Qualifying_DriverID (dbo.drivers driverId)INT0Foreign key link to drivers table
constructorIdFK_Qualifying_ConstructorID (dbo.constructors constructorId)INT0Foreign key link to constructors table
numberINT0Driver number
positionINTQualifying position
q1TIMEQ1 lap time e.g. "1:21.374"
q2TIMEQ2 lap time
q3TIMEQ3 lap time

Table Relationships

Qualifying

Where Used

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

Example Query

SELECT 
[qualifyId]
,r.[raceId]
,r.name AS [race_name]
,d.[driverId]
,CONCAT(d.forename,' ',d.surname) AS [driver_name]
,c.[constructorId]
,c.name AS [constructor_name]
,q.[number]
,[position]
,[q1]
,[q2]
,[q3]
FROM
[dbo].[qualifying] q

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

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

INNER JOIN [dbo].[constructors] c
ON c.constructorId = q.constructorId
WHERE
r.year = '2023'

Example Output

qualifyIdraceIddriverIdconstructorIdnumberpositionq1q2q3
1181122100:01:26.57200:01:25.18700:01:26.714
218924200:01:26.10300:01:25.31500:01:26.869