Tooster

Untitled

Apr 3rd, 2018
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. MATCH (t:Troll)-[:POSTED]->(:Tweet)-[:CONTAINS_ENTITY]->(l:Location)
  2. RETURN l.name AS name, COUNT(DISTINCT t) AS num ORDER BY num DESC LIMIT 10
  3.  
  4. MATCH (:Tweet)-[:MENTIONS]->(t:Troll)
  5. RETURN t.name AS name, COUNT(*) AS num ORDER BY num DESC LIMIT 10
  6.  
  7. MATCH (u:User)-[:POSTED]->(:Tweet)-[:MENTIONS]->(t:Troll)
  8. RETURN t.name AS name, COUNT(DISTINCT u) AS num ORDER BY num DESC LIMIT 10
  9.  
  10. MATCH (t:Tweet) WHERE t.created_str > "2014-07" and t.created_str < "2017-09"
  11. RETURN substring(t.created_str,0,7) AS day,
  12. COUNT(t) AS num ORDER BY day
  13.  
  14. MATCH (u:User)-[:POSTED]->(t:Tweet) WHERE u.location = "USA" and EXISTS(t.created_at)
  15. RETURN substring(t.created_str,11,2) AS hour,
  16. COUNT(t) AS num ORDER BY hour
  17.  
  18. MATCH (trump:User),(clinton:User),
  19. p = shortestPath((trump)-[*..15]-(clinton))
  20. WHERE trump.screen_name = "realdonaldtrump" AND clinton.screen_name = "hillaryclinton"
  21. RETURN p
  22.  
  23. MATCH (t:Tweet) WHERE t.created_str > "2014-07" and t.created_str < "2017-09"
  24. RETURN substring(t.created_str,0,7) AS day,
  25. COUNT(t) AS num ORDER BY day
  26.  
  27. MATCH (u:User)-[:POSTED]->(t:Tweet) WHERE u.location = "USA" and EXISTS(t.created_at)
  28. RETURN substring(t.created_str,11,2) AS hour,
  29. COUNT(t) AS num ORDER BY hour
  30.  
  31. MATCH (a:Troll)-[:POSTED]->(:Tweet)-[:RETWEETED]->(:Tweet)<-[:POSTED]-(b:Troll)
  32. WHERE a<>b
  33. MERGE (a)-[r:CITES]->(b)
  34. RETURN count(r)
  35.  
  36. CALL algo.labelPropagation("MATCH (t:Troll) RETURN id(t) AS id","MATCH (r1:Troll)-[:POSTED]->(t:Tweet)<-[:RETWEETED]-(:Tweet)<-[:POSTED]-(r2:Troll) RETURN id(r2) AS source, id(r1) AS target, COUNT(t) AS weight","OUTGOING", {graph:'cypher', write: true, iterations: 200})
  37.  
  38. START n=node(*)
  39. MATCH (n)-[r:CITES]->(x)
  40. DELETE r
  41.  
  42. MATCH (u:User)-[:POSTED]->(t:Tweet)
  43. WHERE t.text contains 'conspiracy'
  44. RETURN u.screen_name, count(u) as paranoia_number ORDER BY paranoia_number DESC
Add Comment
Please, Sign In to add comment