|Re: How to join two query results into a single one?||Florian B.||1/22/13 6:21 AM|
I think you can work with optional relationship here:
On Tuesday, January 22, 2013 3:03:26 PM UTC+1, Sarpdoruk Tahmaz wrote:
|unk...@googlegroups.com||1/22/13 6:47 AM||<This message has been deleted.>|
|Re: How to join two query results into a single one?||Sarpdoruk Tahmaz||1/22/13 1:57 PM|
I did not realize that this query gives duplicates, it works well but provides duplicates in return. I guess, firstly it finds 0 level deep nodes then it traverses whole graph one more to find at most 1 level deep nodes. Here is the problem; at most 1 level deep means it includes 0 level deep nodes too so at the end there are 2 sets of 0 level deep nodes. I added DISTINCT to get rid of duplicates and it worked just fine, but if there are any other solution to duplicates without using duplicated I'd appreciate that too.
|Re: How to join two query results into a single one?||Florian B.||1/23/13 12:25 AM|
Mh what you can do is separate you query in two parts. First part get all nodes you want to check the status of, me and my friends. In the second part you get the status updates.
With the WITH statement you define which variables of the previous part should be used in the next part.
|Re: How to join two query results into a single one?||Sarpdoruk Tahmaz||1/23/13 2:25 AM|
That worked just fine. Thanks for the alterative solution using WITH statement.