From e12a33eb9b31b65b12ed90f0c4ead337ea647c3c Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 22 Oct 2014 23:16:08 +0200 Subject: * useful SQL queries --- doc/sql.txt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/sql.txt (limited to 'doc') 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 -- cgit v1.2.3