0
如何獲得有史以來最好的排名,考慮最佳時間和得分?假設用戶贏得了幾次,那麼如何計算最佳用戶贏得次數以及平均獲勝時間是多少?如何使SQL查詢排名?
+----------------+----------------+--------+-----------------------+
| user_id | quiz_id | score | finish |
+----------------+----------------+--------+-----------------------+
| 1 | 1 | 1 | 2011-05-18 21:39:00 |
| 2 | 1 | 1 | 2011-05-18 21:43:10 |
| 3 | 1 | 0 | 2011-05-18 21:40:55 |
| 1 | 2 | 1 | 2011-05-18 22:51:57 |
| 2 | 2 | 1 | 2011-05-18 22:21:37 |
| 3 | 2 | 0 | 2011-05-18 22:22:48 |
| 4 | 2 | 1 | 2011-05-18 22:58:14 |
+----------------+----------------+--------+-----------------------+
開始時間在哪裏? – manji 2011-05-18 23:08:23
在測驗桌上。 – luzny 2011-05-19 06:28:19