diff options
author | emkael <emkael@tlen.pl> | 2014-10-22 23:16:08 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2014-10-22 23:16:08 +0200 |
commit | e12a33eb9b31b65b12ed90f0c4ead337ea647c3c (patch) | |
tree | 5d2e26b377ed3944e03125a544e501bf3483dd40 | |
parent | 7cd0222e730798399a30057dafdaf19cc193a9c3 (diff) |
* useful SQL queries
-rw-r--r-- | doc/sql.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/sql.txt b/doc/sql.txt new file mode 100644 index 0000000..cc9f187 --- /dev/null +++ b/doc/sql.txt @@ -0,0 +1,5 @@ +Useful queries: + +SELECT * FROM `rankings` JOIN drivers ON rankings._driver = drivers.id WHERE ranking >= (SELECT MAX(r.ranking) FROM rankings r WHERE r.rank_date <= rankings.rank_date) ORDER BY rank_date ASC + + - selects top rating progression |