Commit e9865348 authored by 张彦钊's avatar 张彦钊

修改了活跃用户的sql

parent fa08973b
...@@ -29,7 +29,8 @@ def ctr_all(): ...@@ -29,7 +29,8 @@ def ctr_all():
db = pymysql.connect(host='10.66.157.22', port=4000, user='root', passwd='3SYz54LS9#^9sBvC', db='jerry_prod') db = pymysql.connect(host='10.66.157.22', port=4000, user='root', passwd='3SYz54LS9#^9sBvC', db='jerry_prod')
cursor = db.cursor() cursor = db.cursor()
sql_active = "select distinct device_id from data_feed_exposure " \ sql_active = "select distinct device_id from data_feed_exposure " \
"where cid_type = 'diary' and device_id regexp'[5|6]$' and stat_date = '{}';".format(date) "where (cid_type = 'diary' or cid_type = 'diary_video') " \
"and device_id regexp'[5|6]$' and stat_date = '{}';".format(date)
cursor.execute(sql_active) cursor.execute(sql_active)
result = cursor.fetchall() result = cursor.fetchall()
tail56 = pd.DataFrame(list(result))[0].values.tolist() tail56 = pd.DataFrame(list(result))[0].values.tolist()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment