import os
import pymysql
conn = pymysql.connect(
    host=os.environ['MYSQL_HOST'],
    user=os.environ['MYSQL_USERNAME'],
    password=os.environ['MYSQL_PASSWORD'],
    database='plwiki_p',
    charset='utf8'
)
with conn.cursor() as cur:
    cur.execute('use plwiki_p')
    cur.execute("select * from flaggedrevs_statistics where frs_stat_key='reviewedPages-NS:0' or frs_stat_key='syncedPages-NS:0' order by frs_timestamp desc limit 50;")
    dbs = cur.fetchall()
    for s in dbs:
        print(s[2]-pc)
        pc = s[2]
-1347
7903
-8315
7987
-8684
8142
-9231
8782
-10593
10172
-11870
10697
-11269
10437
-11007
10481
-10565
10163
-10206
9903
-10029
9697
-10072
9677
-10236
9849
-10068
9703
-9697
9676
-9682
9662
-9665
9652
-9654
9642
-9669
9661
-9676
9667
-9641
9635
-9633
9632
-9632
9630
-9641
9638
-9619
9613