MATCH (u:Anonymous-Users)-[r:INQUIRY_ON|VIEW]->(p:Product)-[:BELONG_TO]->(l4:Category)
with u as u, head(collect(r.traffic_ts)) as headts, head(collect(
p.id)) as headp, head(collect(l4)) as headl4 order by u.cookie
WHERE (headts > 1463500800000 and headts < 1463587200000) // this is millisecond time
with u.cookie as ucookie, headp as headp, headl4 as headl4 order by u.cookie
match (b:Registered-Users)
where has(b.nvu_cookie_id) and b.nvu_cookie_id = ucookie
we have 600,000 Registered Buyer, and this cypher is running forever and never return
I believe there's a smarter way doing this?