Commit 2c4c9641 authored by 张彦钊's avatar 张彦钊

change eda

parent b35d5900
......@@ -18,12 +18,12 @@ def test(days):
start = (temp - datetime.timedelta(days)).strftime("%Y-%m-%d")
print(start)
sql = "select (select count(*) from train_data where stat_date = '{}' and y = 0)/(select count(*) " \
"from train_data where stat_date = '{}' and z = 1)".format(start)
"from train_data where stat_date = '{}' and z = 1)".format(start,start)
db = pymysql.connect(host='10.66.157.22', port=4000, user='root', passwd='3SYz54LS9#^9sBvC', db='jerry_test')
exp = con_sql(db, sql)
print(exp)
sql = "select (select count(*) from train_data where stat_date = '{}' and y = 1 and z = 0)/(select count(*) " \
"from train_data where stat_date = '{}' and z = 1)".format(start)
"from train_data where stat_date = '{}' and z = 1)".format(start,start)
click = con_sql(db, sql)
return start,exp,click
......
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