neo4j - cyhper combine two columns into a single -


i couldn't find similar post, if know 1 or if question not proper one, please let me know.

i have query

match   (t:taxi {name:'taxi1813'})<-[:assigned]-(u2:user)-[rd2:drop_off]->   (g2:grid)-[r:to*1..2]-(g:grid)<-[rd:drop_off]-(u:user)-[:assigned]->(t) id(u2) < id(u) , rd2.time >= '04:38' , rd2.time <= '04:42' distinct u2, g2, u, g, rd2, rd match p=shortestpath((g2)-[r:to*1..2]-(g)) rd2, rd,u2, g2, u, g, p, reduce(totaltime = 0, x in relationships(p) | totaltime + x.time) totaltime totaltime <= 4 return u2.name, u.name 

so @ end got 2 columns

u2.name  u.name user179  usertest user177  user179 

is there way or function merge both columns single 1 , remove duplicates

users user179 user177 usertest 

any suggestions? thank you

you can combine 2 collections single collection , return distinct items.

with ['user179', 'user177'] list1 , ['usertest', 'user179'] list2 unwind list1 + list2 item return distinct item 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -