Commit ca581e57 authored by litaolemo's avatar litaolemo

update

parent 22c813c4
...@@ -104,10 +104,10 @@ for t in range(0, task_days): ...@@ -104,10 +104,10 @@ for t in range(0, task_days):
for res in sql_res: for res in sql_res:
print(res) print(res)
print("-----------------------------------------------------------------------------") print("0-----------------------------------------------------------------------------")
# 商详页PV # 商详页PV
bus_detail_pv_sql = """SELECT bus_detail_pv_sql = """SELECT
partition_date,count(1) welfare_pv a2.partition_date,count(1) welfare_pv
FROM FROM
( (
SELECT cl_id,partition_date SELECT cl_id,partition_date
...@@ -131,7 +131,7 @@ for t in range(0, task_days): ...@@ -131,7 +131,7 @@ for t in range(0, task_days):
sql_res = bus_detail_pv_df.collect() sql_res = bus_detail_pv_df.collect()
for res in sql_res: for res in sql_res:
print(res) print(res)
print("-----------------------------------------------------------------------------") print("1-----------------------------------------------------------------------------")
# cpc当日预算(有效口径) # cpc当日预算(有效口径)
cpc_budget_sql = """SELECT day_id,sum(budget) as budget cpc_budget_sql = """SELECT day_id,sum(budget) as budget
FROM FROM
...@@ -189,7 +189,7 @@ for t in range(0, task_days): ...@@ -189,7 +189,7 @@ for t in range(0, task_days):
sql_res = cpc_budget_df.collect() sql_res = cpc_budget_df.collect()
for res in sql_res: for res in sql_res:
print(res) print(res)
print("-----------------------------------------------------------------------------") print("2-----------------------------------------------------------------------------")
cpc_income_total_consume_sql = """ cpc_income_total_consume_sql = """
select partition_day, select partition_day,
sum(case when advertise_type = 'cpc' AND advertise_business_type in('service') and advertise_calculate_type='cpc_log' then cpc_click_num end) cpc_click_num, sum(case when advertise_type = 'cpc' AND advertise_business_type in('service') and advertise_calculate_type='cpc_log' then cpc_click_num end) cpc_click_num,
...@@ -218,7 +218,7 @@ group by partition_day ...@@ -218,7 +218,7 @@ group by partition_day
cpc_income_total_consume_df_res = cpc_income_total_consume_df.collect() cpc_income_total_consume_df_res = cpc_income_total_consume_df.collect()
for res in cpc_income_total_consume_df_res: for res in cpc_income_total_consume_df_res:
print(res) print(res)
print("-----------------------------------------------------------------------------") print("3-----------------------------------------------------------------------------")
# for res in sql_res: # for res in sql_res:
# # print(res) # # print(res)
# day_id = res.day_id # day_id = res.day_id
......
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