新增1177题,移除部分重复题,同步器提速

This commit is contained in:
Zane York 2018-04-15 12:50:18 +08:00
parent 11a087f5d8
commit 9f7d74039d
2 changed files with 2 additions and 2 deletions

BIN
data.db

Binary file not shown.

View File

@ -73,7 +73,7 @@ cursor = c.execute('''
SELECT Q.QUIZ,OPTION,SCHOOL,TYPE,CONTRIBUTOR,ACCESS_TIME FROM QUSTION Q SELECT Q.QUIZ,OPTION,SCHOOL,TYPE,CONTRIBUTOR,ACCESS_TIME FROM QUSTION Q
LEFT JOIN ( LEFT JOIN (
SELECT QUIZ,MAX(ACCESS_TIME) ACCESS_TIME FROM ACCESS_LOG GROUP BY QUIZ HAVING ACCESS_TIME = MAX(ACCESS_TIME) SELECT QUIZ,MAX(ACCESS_TIME) ACCESS_TIME FROM ACCESS_LOG GROUP BY QUIZ HAVING ACCESS_TIME = MAX(ACCESS_TIME)
) A ON Q.QUIZ like A.QUIZ; ) A ON Q.QUIZ = A.QUIZ;
''') ''')
questions1 = {} questions1 = {}
for row in cursor: for row in cursor:
@ -82,7 +82,7 @@ cursor = c2.execute('''
SELECT Q.QUIZ,OPTION,SCHOOL,TYPE,CONTRIBUTOR,ACCESS_TIME FROM QUSTION Q SELECT Q.QUIZ,OPTION,SCHOOL,TYPE,CONTRIBUTOR,ACCESS_TIME FROM QUSTION Q
LEFT JOIN ( LEFT JOIN (
SELECT QUIZ,MAX(ACCESS_TIME) ACCESS_TIME FROM ACCESS_LOG GROUP BY QUIZ HAVING ACCESS_TIME = MAX(ACCESS_TIME) SELECT QUIZ,MAX(ACCESS_TIME) ACCESS_TIME FROM ACCESS_LOG GROUP BY QUIZ HAVING ACCESS_TIME = MAX(ACCESS_TIME)
) A ON Q.QUIZ like A.QUIZ; ) A ON Q.QUIZ = A.QUIZ;
''') ''')
questions2 = {} questions2 = {}
for row in cursor: for row in cursor: