formula_1 Database Schema

Database Description

Database for formula 1.

Schema Structure
Schema information not available for this database.
Example Queries

SQL Query:
SELECT name FROM races WHERE year = 2005 ORDER BY name DESC
Difficulty: simple

SQL Query:
SELECT T2.forename, T2.surname, T1.fastestLapTime FROM results AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T1.fastestLapTime IS NOT NULL ORDER BY T1.fastestLapTime ASC LIMIT 1
Difficulty: moderate

SQL Query:
SELECT AVG(T1.fastestLapTime) FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T1.rank < 11 AND T2.year = 2006 AND T2.name = 'United States Grand Prix'
Evidence:

top 10 refers to rank <11; AVG(fastestLapTime);

Difficulty: simple

SQL Query:
SELECT circuitRef FROM circuits WHERE name = 'Marina Bay Street Circuit'
Evidence:

reference name refers to circuitRef; Marina Bay Street Circuit refers to circuits.name = 'Marina Bay Street Circuit'

Difficulty: simple

SQL Query:
SELECT T1.forename, T1.surname FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T2.raceId = 872 AND T2.time IS NOT NULL ORDER BY T1.dob DESC LIMIT 1
Evidence:

race number refers to raceId; drivers who finished the race refers to time has value; the youngest is a driver where MAX(dob);

Difficulty: moderate
Back to Database Explorer