我们原有的cypher是这样的,怎么改成nebula cypher呢
match (m:USER {mobileId:'1bb7d145a19749a9e1b1f12dc613233115d5df3e22c741309ea12e71256d03d6'})
optional match (m)-[r1:CALL_TO]-(x:MOBILE)-[:APPLY_FOR]->(a1:APPL)-[:APPLY_ON]-(t1:TIME)
where r1.first_callmark_on<=20220602 and replace(t1.date,'-','')<='20220602'
with m,collect(distinct x) as col_appl_1st_v4
unwind case when col_appl_1st_v4 =[] then [null] else col_appl_1st_v4 end as x
optional match (x)-[r2:CALL_TO]-(n:USER) where r2.first_callmark_on<=20220602 and not (m=n)
with m,col_appl_1st_v4,collect(distinct n) as col_user_2nd_v4
with m,col_appl_1st_v4,col_user_2nd_v4,filter(n in col_user_2nd_v4 where "MOBILE" in labels(n)) as col_mobile_2nd_v4
unwind case when col_mobile_2nd_v4 =[] then [null] else col_mobile_2nd_v4 end as n
optional match (n)<-[r3:CBK_STATE_ENTERPRISE_LEADER]-(y:USER) where r3.first_cbkmark_on<=20220602 and not (y=n)
with m,col_appl_1st_v4,col_user_2nd_v4,col_mobile_2nd_v4,
count(distinct case when y is not null then n else null end) as n_cbkin_State_enterprise_leader_2nd_v4
unwind case when col_mobile_2nd_v4 =[] then [null] else col_mobile_2nd_v4 end as n
optional match (n)<-[r3:CBK_ENGINEER]-(y:USER) where r3.first_cbkmark_on<=20220602 and not (y=n)
with m,col_appl_1st_v4,col_user_2nd_v4,col_mobile_2nd_v4,n_cbkin_State_enterprise_leader_2nd_v4,
count(distinct case when y is not null then n else null end) as n_cbkin_Engineer_2nd_v4
unwind case when col_mobile_2nd_v4 =[] then [null] else col_mobile_2nd_v4 end as n
optional match (n:MOBILE)-[:APPLY_FOR]->(a2:APPL)-[:APPLY_ON]->(t2:TIME) where replace(t2.date,'-','')<='20220602'
with m,col_appl_1st_v4,col_user_2nd_v4,col_mobile_2nd_v4,n_cbkin_State_enterprise_leader_2nd_v4,n_cbkin_Engineer_2nd_v4,
collect(distinct case when a2 is not null then n else null end) as col_appl_2nd_v4
unwind case when col_appl_2nd_v4 =[] then [null] else col_appl_2nd_v4 end as n
optional match (n:MOBILE)-[:APPLY_FOR]->(a2:LOAN_BK)-[:APPLY_ON]->(t2:TIME) where replace(t2.date,'-','')<='20220602'
with m,col_appl_1st_v4,col_user_2nd_v4,col_mobile_2nd_v4,n_cbkin_State_enterprise_leader_2nd_v4,n_cbkin_Engineer_2nd_v4,col_appl_2nd_v4,
collect(distinct case when a2 is not null then n else null end) as col_bk_2nd_v4
unwind case when col_bk_2nd_v4 =[] then [null] else col_bk_2nd_v4 end as n
optional match (n:MOBILE)-[:APPLY_FOR]->(a2:LOAN_BK)-[:M2_ON]->(t2:TIME) where replace(t2.date,'-','')<='20220602'
with m,col_appl_1st_v4,col_user_2nd_v4,col_mobile_2nd_v4,n_cbkin_State_enterprise_leader_2nd_v4,n_cbkin_Engineer_2nd_v4,col_appl_2nd_v4,col_bk_2nd_v4,
count(distinct case when a2 is not null then n else null end) as n_bad30p_2nd_v4
unwind case when col_appl_2nd_v4 =[] then [null] else col_appl_2nd_v4 end as n
optional match (n:MOBILE)-[:APPLY_FOR]->(a2:A_BLACK_LIST)-[:APPLY_ON]->(t2:TIME) where replace(t2.date,'-','')<='20220602'
with m,col_appl_1st_v4,col_user_2nd_v4,col_mobile_2nd_v4,n_cbkin_State_enterprise_leader_2nd_v4,n_cbkin_Engineer_2nd_v4,col_appl_2nd_v4,
col_bk_2nd_v4,n_bad30p_2nd_v4,count(distinct case when a2 is not null then n else null end) as n_ablk_2nd_v4
unwind case when col_appl_2nd_v4 =[] then [null] else col_appl_2nd_v4 end as n
optional match (n:MOBILE)-[:APPLY_FOR]->(a2:C_BLACK_LIST)-[:APPLY_ON]->(t2:TIME) where replace(t2.date,'-','')<='20220602'
with m,col_appl_1st_v4,col_user_2nd_v4,col_mobile_2nd_v4,n_cbkin_State_enterprise_leader_2nd_v4,n_cbkin_Engineer_2nd_v4,col_appl_2nd_v4,
col_bk_2nd_v4,n_bad30p_2nd_v4,n_ablk_2nd_v4,count(distinct case when a2 is not null then n else null end) as n_cblk_2nd_v4
return size(col_appl_1st_v4) as n_appl_1st_v4,size(col_user_2nd_v4) as n_user_2nd_v4,
size(col_mobile_2nd_v4) as n_mobile_2nd_v4,size(col_appl_2nd_v4) as n_appl_2nd_v4,
n_cbkin_State_enterprise_leader_2nd_v4,n_cbkin_Engineer_2nd_v4,
size(col_bk_2nd_v4) as n_bk_2nd_v4,n_bad30p_2nd_v4,n_ablk_2nd_v4,n_cblk_2nd_v4,
size(filter(n in col_user_2nd_v4 where 'ORG' in labels(n))) as n_org_2nd_v4,
size(filter(n in col_user_2nd_v4 where 'EXPRESS' in labels(n))) as n_express_2nd_v4,
size(filter(n in col_user_2nd_v4 where 'AGENCY' in labels(n))) as n_agency_2nd_v4,
size(filter(n in col_user_2nd_v4 where 'BNK_ORG' in labels(n))) as n_bnk_org_2nd_v4,
size(filter(n in col_user_2nd_v4 where 'OTHER_ORG' in labels(n))) as n_other_org_2nd_v4