formula_1 Database Schema

Database Description

Database for formula 1.

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

SQL Query:
SELECT DISTINCT T2.time FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Sepang International Circuit'
Difficulty: simple

SQL Query:
SELECT T1.country, T1.location FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'European Grand Prix' ORDER BY T2.year ASC LIMIT 1
Evidence:

the first refers to min(year);

Difficulty: simple

SQL Query:
SELECT AVG(T2.points) FROM drivers AS T1 INNER JOIN driverStandings AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton' AND T3.name = 'Turkish Grand Prix'
Evidence:

Average score = AVG(points)

Difficulty: moderate

SQL Query:
SELECT T1.nationality FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId ORDER BY T2.fastestLapSpeed DESC LIMIT 1
Evidence:

the fastest lap speed refers to (MAX) fastestLapSpeed;

Difficulty: moderate

SQL Query:
SELECT DISTINCT location, lat, lng FROM circuits WHERE country = 'Austria'
Evidence:

location coordinates refers to (lat,lng); Austria refers to country = 'Austria';

Difficulty: simple
Back to Database Explorer