neo4j: Is there a way/how to select random nodes?
You can limit your query with skip/limit so you could do
START t=node(*)
MATCH (a)-[:LEADS_TO]->(t)
RETURN a
SKIP {randomoffset} LIMIT {randomcount}
Otherwise you can also create a set of random node-id's and pass them as parameter to the cypher statement.
You can use such construction:
MATCH (a)-[:LEADS_TO]->(t)
RETURN a, rand() as r
ORDER BY r
It should return you random set of object.
Tested with Neo4j 2.1.3