summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2014-11-04 21:17:21 +0100
committeremkael <emkael@tlen.pl>2014-11-04 21:17:21 +0100
commitb38eae8f361d02aace7f52e89fa2e1a5f54176a6 (patch)
treee3eced9c87880dc2be670f8ad528c3fcd74131d6 /doc
parent463c6393d000176ef18147cb0eba447fc1699448 (diff)
parent6afa9f129823f7279ed8809f7bcb4c3b5d345859 (diff)
Merge branch 'master'
Diffstat (limited to 'doc')
-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