Skip to main content

Overview

Performance tables capture the on-track action, including race results, qualifying times, lap-by-lap data, and pit stop information. These tables form the core analytical dataset for Formula 1 performance analysis.

results.csv

The primary table containing race results, finishing positions, and performance statistics for each driver in each race.

Schema

resultId
integer
required
Unique identifier for each result. Primary key.Example: 1
raceId
integer
required
Foreign key to races.csv.Example: 18
driverId
integer
required
Foreign key to drivers.csv.Example: 1
constructorId
integer
required
Foreign key to constructors.csv.Example: 1
number
integer
Driver’s car number for this race. May be \N for older races.Example: 44
grid
integer
required
Starting grid position (1 = pole position, 0 = pitlane start).Example: 1
position
integer
Finishing position. May be \N if driver did not finish.Example: 1
positionText
string
required
Text representation of position. May be “R” (retired), “D” (disqualified), “E” (excluded), “W” (withdrawn), “F” (failed to qualify), “N” (not classified), or a number.Example: "1" or "R"
positionOrder
integer
required
Order of finish for sorting purposes. Finishers come before non-finishers.Example: 1
points
float
required
Championship points scored in this race.Example: 10.0
laps
integer
required
Number of laps completed.Example: 58
time
string
Total race time for winner, or gap to winner (e.g., “+5.478”). May be \N for DNF.Example: "1:34:50.616" or "+5.478"
milliseconds
integer
Total race time in milliseconds. May be \N for DNF.Example: 5690616
fastestLap
integer
Lap number of driver’s fastest lap. May be \N.Example: 39
rank
integer
Rank of this driver’s fastest lap compared to all drivers (1 = fastest). May be \N.Example: 2
fastestLapTime
string
Time of the fastest lap in M:SS.mmm format. May be \N.Example: "1:27.452"
fastestLapSpeed
float
Speed of fastest lap in km/h. May be \N.Example: 218.3
statusId
integer
required
Foreign key to status.csv indicating finish status.Example: 1 (Finished)

Sample Data

resultIdraceIddriverIdconstructorIdgridpositionpointslapstimefastestLapTime
118111110581:34:50.6161:27.452
2182252858+5.4781:27.739
3183373658+8.1631:28.090
Time Format: The time field shows absolute time for P1 and relative time (gap) for all other finishers. DNF entries have \N.

qualifying.csv

Qualifying session results with Q1, Q2, and Q3 times.

Schema

qualifyId
integer
required
Unique identifier for each qualifying result. Primary key.Example: 1
raceId
integer
required
Foreign key to races.csv.Example: 18
driverId
integer
required
Foreign key to drivers.csv.Example: 1
constructorId
integer
required
Foreign key to constructors.csv.Example: 1
number
integer
required
Driver’s car number.Example: 44
position
integer
required
Final qualifying position.Example: 1
q1
string
Q1 lap time in M:SS.mmm format. May be \N if driver didn’t participate.Example: "1:26.572"
q2
string
Q2 lap time. May be \N if driver didn’t advance to Q2.Example: "1:25.187"
q3
string
Q3 lap time. May be \N if driver didn’t advance to Q3.Example: "1:26.714"

Sample Data

qualifyIdraceIddriverIdpositionq1q2q3
118111:26.5721:25.1871:26.714
218921:26.1031:25.3151:26.869
318531:25.6641:25.4521:27.079
Qualifying Format: Drivers eliminated in Q1 have only q1 populated. Top 15 have q1 and q2. Top 10 have all three sessions.

sprint_results.csv

Results from sprint races (introduced in 2021).

Schema

resultId
integer
required
Unique identifier for each sprint result. Primary key.
raceId
integer
required
Foreign key to races.csv.
driverId
integer
required
Foreign key to drivers.csv.
constructorId
integer
required
Foreign key to constructors.csv.
number
integer
required
Driver’s car number.
grid
integer
required
Starting grid position for sprint.
position
integer
Finishing position. May be \N for DNF.
positionText
string
required
Text representation of position.
positionOrder
integer
required
Order of finish for sorting.
points
float
required
Points scored in sprint race.Example: 3.0 (P1 in sprint)
laps
integer
required
Number of laps completed in sprint.
time
string
Sprint race time or gap.
milliseconds
integer
Time in milliseconds.
fastestLap
integer
Lap number of fastest lap.
fastestLapTime
string
Fastest lap time.
statusId
integer
required
Foreign key to status.csv.
rank
integer
Rank of fastest lap.

Sample Data

resultIdraceIddriverIdgridpositionpointslapstime
110618302131725:38.426
21061112217+1.430
Sprint Points: Sprint races award fewer points than main races. The points system has changed over the years (2021: top 3, 2022+: top 8).

lap_times.csv

Individual lap times for every driver in every lap of a race.

Schema

raceId
integer
required
Foreign key to races.csv. Part of composite primary key.
driverId
integer
required
Foreign key to drivers.csv. Part of composite primary key.
lap
integer
required
Lap number. Part of composite primary key.Example: 1
position
integer
required
Driver’s position at the end of this lap.Example: 1
time
string
required
Lap time in M:SS.mmm format.Example: "1:32.713"
milliseconds
integer
required
Lap time in milliseconds.Example: 92713

Sample Data

raceIddriverIdlappositiontimemilliseconds
84120111:38.10998109
84120211:33.00693006
84120311:32.71392713
Data Availability: Lap time data is generally available from 1996 onwards. Earlier races may not have lap-by-lap data.
First Lap Times: Lap 1 times are typically slower due to the standing start and include the run from grid to timing line.

pit_stops.csv

Detailed pit stop information including duration and timing.

Schema

raceId
integer
required
Foreign key to races.csv. Part of composite primary key.
driverId
integer
required
Foreign key to drivers.csv. Part of composite primary key.
stop
integer
required
Pit stop number for this driver in this race. Part of composite primary key.Example: 1 (first stop)
lap
integer
required
Lap number when pit stop occurred.Example: 18
time
string
required
Time of day when pit stop occurred (HH:MM:SS).Example: "14:22:35"
duration
string
required
Duration of pit stop in seconds.Example: "28.482"
milliseconds
integer
required
Duration of pit stop in milliseconds.Example: 28482

Sample Data

raceIddriverIdstoplaptimedurationmilliseconds
2581001114:01:3449.11149111
2587911714:20:4628.48228482
2585711814:22:3543.74543745
Data Availability: Comprehensive pit stop data is generally available from 2011 onwards.
Duration Measurement: Duration measures time from pit entry to exit, including time in pit box and pit lane.

constructor_results.csv

Constructor results for each race, showing points scored per constructor per race.

Schema

constructorResultsId
integer
required
Unique identifier for each constructor result. Primary key.Example: 1
raceId
integer
required
Foreign key to races.csv.Example: 18
constructorId
integer
required
Foreign key to constructors.csv.Example: 1
points
float
Total points scored by the constructor in this race (sum of both drivers’ points).Example: 14.0
status
string
Status information for the constructor in this race. Often \N (null).Example: \N

Sample Data

constructorResultsIdraceIdconstructorIdpointsstatus
118114\N
21828\N
31839\N
Points Calculation: Constructor points are the sum of points scored by both team drivers in a race. In early F1 seasons, only the best-placed driver’s points counted toward constructor championship.

status.csv

Lookup table for race finishing status codes.

Schema

statusId
integer
required
Unique status identifier. Primary key.Example: 1
status
string
required
Description of the status.Example: "Finished" or "Engine"

Sample Data

statusIdstatus
1Finished
2Disqualified
3Accident
4Collision
5Engine
6Gearbox
7Transmission
8Clutch
9Hydraulics

Common Status Codes

  • 1 - Finished (completed the race)
  • 2 - Disqualified
  • 3 - Accident
  • 4 - Collision
  • 5 - Engine (engine failure)
  • 6 - Gearbox (gearbox failure)
  • 11 - +1 Lap (finished but 1 lap down)
  • 12 - +2 Laps
  • 13 - +3 Laps

Example Queries

Race Winner with Full Details

SELECT 
    d.forename || ' ' || d.surname as driver,
    c.name as constructor,
    res.grid,
    res.laps,
    res.time,
    res.fastestLapTime,
    res.points
FROM results res
JOIN drivers d ON res.driverId = d.driverId
JOIN constructors c ON res.constructorId = c.constructorId
WHERE res.raceId = 1061 AND res.position = 1

Fastest Pit Stop in a Race

SELECT 
    d.code,
    c.name as team,
    ps.stop,
    ps.lap,
    ps.duration
FROM pit_stops ps
JOIN drivers d ON ps.driverId = d.driverId
JOIN results r ON ps.driverId = r.driverId AND ps.raceId = r.raceId
JOIN constructors c ON r.constructorId = c.constructorId
WHERE ps.raceId = 258
ORDER BY ps.milliseconds
LIMIT 1

Qualifying Progression

SELECT 
    d.code,
    q.position,
    q.q1,
    q.q2,
    q.q3
FROM qualifying q
JOIN drivers d ON q.driverId = d.driverId
WHERE q.raceId = 18
ORDER BY q.position

Build docs developers (and LLMs) love