You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
selectlu.uuid uuid,
lu.user_id user_id,
lu.poi_id poi_id,
ex.1day_exposure 1day_exposure,
ex.3day_exposure 3day_exposure,
ex.7day_exposure 3day_exposure,
click.1days_click 1days_click,
click.3days_click 3days_click,
click.7days_click 7days_click,
order.1days_order 1days_order,
order.3days_order 3days_order,
order.7days_order 7days_order,
exp_nord.1days_expnoord 1days_expnoord,
exp_nord.3days_expnoord 3days_expnoord,
exp_nord.7days_expnoord 7days_expnoord,
exp_noclick.1days_expnoclk,
exp_noclick.3days_expnoclk,
exp_noclick.7days_expnoclk,
clk_nord.1days_clknoord,
clk_nord.3days_clknoord,
clk_nord.7days_clknoordfrom (
select dp_id as uuid,
user_id,
poi_id
from table_b
where partition_date between '2024-03-22'and'2024-03-28'and page_id in(40041942,40744225,41861912)
and partition_app='my_app'group by dp_id,
user_id,
poi_id
) lu
left join(
select poi_id,
user_id,
uuid,
sum(if(partition_date ='2024-03-28', 1, 0)) as 1day_exposure,
sum(if(partition_date between '2024-03-26'and'2024-03-28', 1, 0)) as 3day_exposure,
sum(if(partition_date between '2024-03-22'and'2024-03-28', 1, 0)) as 7day_exposure
from table_a
where partition_date between '2024-03-22'and'2024-03-28'and partition_app ='my_app'and event_id in ('yy')
and uuid is not nulland uuid <>''group by poi_id ,user_id,
uuid
)ex on(lu.uuid=ex.uuidandlu.user_id=ex.user_idandlu.poi_id=ex.poi_id)
left join (
select poi_id,
user_id,
uuid,
sum(if(partition_date ='2024-03-28', 1, 0)) as 1days_click,
sum(if(partition_date between '2024-03-26'and'2024-03-28', 1, 0)) as 3days_click,
sum(if(partition_date between '2024-03-22'and'2024-03-28', 1, 0)) as 7days_click
from table_a
where partition_date between '2024-03-22'and'2024-03-28'and partition_app ='my_app'-- mtand event_id in ('xx')
and uuid is not nulland uuid <>''group by poi_id,user_id,
uuid
)click on(lu.uuid=click.uuidandlu.user_id=click.user_idandlu.poi_id=click.poi_id)
left join (
select uuid,
user_id,
poi_id,
sum(if(partition_date ='2024-03-28', 1, 0)) as 1days_order,
sum(if(partition_date between '2024-03-26'and'2024-03-28', 1, 0)) as 3days_order,
sum(if(partition_date between '2024-03-22'and'2024-03-28', 1, 0)) as 7days_order from(
select uuid,
user_id,
deal_id,
poi_id,
req_id,
order_id,
partition_date
from table_c
where platform_type='dp'and (partition_date between '2024-03-22'and'2024-03-28')
and is_pay =1and uuid is not nulland uuid <>''group by uuid,
user_id,
deal_id,
poi_id,
req_id,
order_id,
partition_date
)
group by uuid,
user_id,
poi_id
)
order on(lu.uuid=order.uuidandlu.user_id=order.user_idandlu.poi_id=order.poi_id)
left join (
selectexp_noder.uuid,
exp_noder.user_id,
exp_noder.poi_id,
sum(if(partition_date ='2024-03-28', 1, 0)) as 1days_expnoord,
sum(if(partition_date between '2024-03-26'and'2024-03-28', 1, 0)) as 3days_expnoord,
sum(if(partition_date between '2024-03-22'and'2024-03-28', 1, 0)) as 7days_expnoord
from (
selectexp_noder_exp.uuid,
exp_noder_exp.user_id,
exp_noder_exp.poi_id,
exp_noder_exp.partition_datefrom (
select poi_id,
user_id,
uuid,
partition_date
from table_a
where partition_date between '2024-03-22'and'2024-03-28'and partition_app ='my_app'and event_id in ('b_mrroly')
and uuid is not nulland uuid <>''
)exp_noder_exp
left join (
select uuid,
user_id,
deal_id,
poi_id,
req_id,
order_id,
partition_date
from table_c
where platform_type='dp'and (partition_date between '2024-03-22'and'2024-03-28')
and is_pay =1and uuid is not nulland uuid <>''group by uuid,
user_id,
deal_id,
poi_id,
req_id,
order_id,
partition_date
)exp_noder_ord
on (exp_noder_exp.uuid=exp_noder_ord.uuidandexp_noder_exp.user_id=exp_noder_ord.user_idandexp_noder_exp.poi_id=exp_noder_ord.poi_idandexp_noder_exp.partition_date=exp_noder_ord.partition_date)
whereexp_noder_ord.uuid is nullandexp_noder_ord.user_id is nullandexp_noder_ord.poi_id is null
)exp_noder
group byexp_noder.uuid,
exp_noder.user_id,
exp_noder.poi_id
)exp_nord
on (lu.uuid=exp_nord.uuidandlu.user_id=exp_nord.user_idandlu.poi_id=exp_nord.poi_id)
left join (
selectexp_noclk.uuid,
exp_noclk.user_id,
exp_noclk.poi_id,
sum(if(partition_date ='2024-03-28', 1, 0)) as 1days_expnoclk,
sum(if(partition_date between '2024-03-26'and'2024-03-28', 1, 0)) as 3days_expnoclk,
sum(if(partition_date between '2024-03-22'and'2024-03-28', 1, 0)) as 7days_expnoclk
from (
selectexp_noclk_exp.uuid,
exp_noclk_exp.user_id,
exp_noclk_exp.poi_id,
exp_noclk_exp.partition_datefrom (
select poi_id,
user_id,
uuid,
partition_date
from table_a
where partition_date between '2024-03-22'and'2024-03-28'and partition_app ='my_app'and event_id in ('yy')
and uuid is not nulland uuid <>''
)exp_noclk_exp
left join (
select poi_id,
user_id,
uuid,
partition_date
from table_a
where partition_date between '2024-03-22'and'2024-03-28'and partition_app ='my_app'-- mtand event_id in ('xx')
and uuid is not nulland uuid <>''
)exp_noclk_clk
on (exp_noclk_exp.uuid=exp_noclk_clk.uuidandexp_noclk_exp.user_id=exp_noclk_clk.user_idandexp_noclk_exp.poi_id=exp_noclk_clk.poi_idandexp_noclk_exp.partition_date=exp_noclk_clk.partition_date)
whereexp_noclk_clk.uuid is nullandexp_noclk_clk.user_id is nullandexp_noclk_clk.poi_id is null
)exp_noclk
group byexp_noclk.uuid,
exp_noclk.user_id,
exp_noclk.poi_id
)exp_noclick
on (lu.uuid=exp_noclick.uuidandlu.user_id=exp_noclick.user_idandlu.poi_id=exp_noclick.poi_id)
left join (
selectclk_noder.uuid,
clk_noder.user_id,
clk_noder.poi_id,
sum(if(partition_date ='2024-03-28', 1, 0)) as 1days_clknoord,
sum(if(partition_date between '2024-03-26'and'2024-03-28', 1, 0)) as 3days_clknoord,
sum(if(partition_date between '2024-03-22'and'2024-03-28', 1, 0)) as 7days_clknoord
from (
selectclk_noder_clk.uuid,
clk_noder_clk.user_id,
clk_noder_clk.poi_id,
clk_noder_clk.partition_datefrom (
select poi_id,
user_id,
uuid,
partition_date
from table_a
where partition_date between '2024-03-22'and'2024-03-28'and partition_app ='my_app'-- mtand event_id in ('xx')
and uuid is not nulland uuid <>''
)clk_noder_clk
left join (
select uuid,
user_id,
deal_id,
poi_id,
req_id,
order_id,
partition_date
from table_c
where platform_type='dp'and (partition_date between '2024-03-22'and'2024-03-28')
and is_pay =1and uuid is not nulland uuid <>''group by uuid,
user_id,
deal_id,
poi_id,
req_id,
order_id,
partition_date
)clk_noder_ord
on (clk_noder_clk.uuid=clk_noder_ord.uuidandclk_noder_clk.user_id=clk_noder_ord.user_idandclk_noder_clk.poi_id=clk_noder_ord.poi_idandclk_noder_clk.partition_date=clk_noder_ord.partition_date)
whereclk_noder_ord.uuid is nullandclk_noder_ord.user_id is nullandclk_noder_ord.poi_id is null
)clk_noder
group byclk_noder.uuid,
clk_noder.user_id,
clk_noder.poi_id
)clk_nord
on (lu.uuid=clk_nord.uuidandlu.user_id=clk_nord.user_idandlu.poi_id=clk_nord.poi_id)
whereex.1day_exposureis not nullorex.3day_exposureis not nullorex.7day_exposureis not nullorclick.1days_clickis not nullorclick.3days_clickis not nullorclick.7days_clickis not nullororder.1days_orderis not nullororder.3days_orderis not nullororder.7days_orderis not nullorexp_nord.1days_expnoordis not nullorexp_nord.3days_expnoordis not nullorexp_nord.7days_expnoordis not nullorexp_noclick.1days_expnoclkis not nullorexp_noclick.3days_expnoclkis not nullorexp_noclick.7days_expnoclkis not nullorclk_nord.1days_clknoordis not nullorclk_nord.3days_clknoordis not nullorclk_nord.7days_clknoordis not null
Backend
VL (Velox)
Bug description
table_a with data
Wrong result is :
Spark version
None
Spark configurations
No response
System information
No response
Relevant logs
No response
The text was updated successfully, but these errors were encountered: