Unclear about using 'WITH'

15 views
Skip to first unread message

betseyb

unread,
Mar 6, 2013, 11:25:48 AM3/6/13
to ne...@googlegroups.com
I have a weighted graph illustrating communications between entities.  What I want to do is to get the top N nodes that communicate with a node, and then perform some other query on that set of nodes and relationships.

So my query to get the top N is something like

start me=node({id}) 
match (me)-[r]-(you)
return r, you, order by r.count DESC limit {num}

I have the query I want to perform working on the entire graph, I'm just not certain how to make it only work on the subgraph.  One example:

start me=node({id})
match (me)-[*2..2]-(you)
where not (me)--(you) 
return u


Peter Neubauer

unread,
Mar 7, 2013, 5:48:02 AM3/7/13
to Neo4j User
Hi there,
could you please post this on Stack overflow? I illustrated your example at http://console.neo4j.org/r/o6a57v, which you might include.

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Graph database introduction book for the uninitiated - http://graphdatabases.com
Neo4j questions? Please use SO - http://stackoverflow.com/search?q=neo4j




--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Betsey Benagh

unread,
Mar 7, 2013, 10:29:40 AM3/7/13
to ne...@googlegroups.com
I did post it there, it's at http://stackoverflow.com/questions/15257638/using-limit-and-order-by-in-with-clause-in-neo4j

Thanks,

betsey
Betsey Benagh

Boston Fusion Corp.
1 Van de Graaff Drive, Ste 107
Burlington, MA 01803-5176
betsey...@bostonfusion.com
781-367-6720 (mobile)




--
You received this message because you are subscribed to a topic in the Google Groups "Neo4j" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neo4j/ObUNUUe9aZU/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to neo4j+un...@googlegroups.com.

Peter Neubauer

unread,
Mar 7, 2013, 10:42:34 AM3/7/13
to Neo4j User
Thank you Betsey,

the discussion is already underway :)


Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Graph database introduction book for the uninitiated - http://graphdatabases.com
Neo4j questions? Please use SO - http://stackoverflow.com/search?q=neo4j


Reply all
Reply to author
Forward
0 new messages