formula_1 Database Schema

Database Description

Database for formula 1.

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

SQL Query:
SELECT SUM(T2.points) FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton'
Difficulty: simple

SQL Query:
SELECT T2.surname FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 19 ORDER BY T1.q2 ASC LIMIT 1
Evidence:

race number refers to raceId; second qualifying period refers to q2; best lap time refers to MIN(q2);

Difficulty: simple

SQL Query:
SELECT DISTINCT T1.lat, T1.lng FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'Malaysian Grand Prix'
Evidence:

location coordinates refers to (lat, lng); Malaysian Grand Prix refers to races.name = 'Malaysian Grand Prix'

Difficulty: simple

SQL Query:
SELECT T1.nationality FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T2.raceId = 933 AND T2.fastestLapTime IS NOT NULL ORDER BY T2.fastestLapSpeed DESC LIMIT 1
Evidence:

fastest lap speed refers to MAX(fastestLapSpeed);

Difficulty: simple

SQL Query:
SELECT T2.nationality FROM constructorResults AS T1 INNER JOIN constructors AS T2 ON T2.constructorId = T1.constructorId WHERE T1.raceId = 24 AND T1.points = 1
Evidence:

race number refers to raceId;

Difficulty: simple
Back to Database Explorer