|
@@ -64,7 +64,7 @@ group by promoter_id
|
|
|
count(distinct case when order_status!=80 then oid end) as valid_order_num
|
|
|
from {database}.kuaishou_supply_chain
|
|
|
where stat_date <= {stat_date}
|
|
|
- and promoter_id = {promoter_id}
|
|
|
+ and promoter_id = '{promoter_id}'
|
|
|
group by promoter_id, item_id) a
|
|
|
left join
|
|
|
(select item_id,
|
|
@@ -77,7 +77,7 @@ group by promoter_id
|
|
|
collect_sample_name,
|
|
|
create_time
|
|
|
from {database}.kuaishou_item_collect_samples
|
|
|
- where promoter_id = {promoter_id}) b
|
|
|
+ where promoter_id = '{promoter_id}') b
|
|
|
on a.promoter_id = b.promoter_id and a.item_id = b.item_id
|
|
|
left join (select item_id, relate_id, user_id, user_name, item_title
|
|
|
from {database}.kuaishou_item_list
|
|
@@ -89,7 +89,7 @@ group by promoter_id
|
|
|
count(distinct case when order_status!=80 then oid end) as valid_order_num
|
|
|
from {database}.kuaishou_supply_chain
|
|
|
where stat_date <= date_format(date_sub('{stat_date}', interval 1 day), '%Y%m%d')
|
|
|
- and promoter_id = {promoter_id}
|
|
|
+ and promoter_id = '{promoter_id}'
|
|
|
group by promoter_id, item_id) e
|
|
|
on a.promoter_id = e.promoter_id and a.item_id = e.item_id
|
|
|
""".format(stat_date=self.stat_date, promoter_id=promoter_id,database=database)
|