summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/sql.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/sql.txt b/doc/sql.txt
index 32e7fa3..4d54f70 100644
--- a/doc/sql.txt
+++ b/doc/sql.txt
@@ -63,3 +63,7 @@ SELECT YEAR(rank_date),
FROM rankings
GROUP BY YEAR(rank_date)
ORDER BY YEAR(rank_date) ASC;
+
+ - qualifying/grid sanity check
+
+SELECT drivers.number, drivers.forename, drivers.surname, races.year, races.name, qualifying.number, qualifying.position, qualifying.q1, qualifying.q2, qualifying.q3, results.grid, results.number FROM qualifying INNER JOIN results ON (qualifying.driverID = results.driverId) AND (qualifying.raceId = results.raceId) JOIN drivers ON drivers.driverId = results.driverId JOIN races ON results.raceId = races.raceId WHERE qualifying.position <> results.grid ORDER BY races.date ASC