Skip to content

Instantly share code, notes, and snippets.

@minmaxdata
Forked from jexp/graph_gist_template.adoc
Last active September 14, 2019 21:10
Show Gist options
  • Save minmaxdata/3c545cd8cc05b87de900e3d55249ef50 to your computer and use it in GitHub Desktop.
Save minmaxdata/3c545cd8cc05b87de900e3d55249ef50 to your computer and use it in GitHub Desktop.
CHANGEME: GraphGist Template. Fork to make your own, view source to see instruction comments

NEARBY LISTINGS

Introduction

Want to model data for housing rentals in particular listings and a relationship to other listing base on location in a city.

5giAsjq

Setup

CREATE
  (a:Person {name: 'Alice'}),
  (b:Person {name: 'Bob'}),
  (c:Person {name: 'Carrie'}),
  (d:Person {name: 'David'}),
  (e:Person {name: 'Emily'}),
  (a)-[:FRIENDS_WITH]->(b),
  (a)-[:FRIENDS_WITH]->(e),
  (b)-[:FRIENDS_WITH]->(c),
  (b)-[:FRIENDS_WITH]->(d)

REPLACEME: FIRST USECASE TITLE

MATCH (a:Person {name: 'Alice'})-[:FRIENDS_WITH]-(:Person)-[:FRIENDS_WITH]-(fof:Person)
RETURN fof.name as fof, count(*) as frequency

REPLACEME: SECOND USE-CASE TITLE

MATCH path=(a:Person {name: 'Alice'})-[:FRIENDS_WITH]-(:Person)-[:FRIENDS_WITH]-(fof:Person)
RETURN path, a, fof

REPLACEME: THIRD USE-CASE TITLE

Conclusions

REPLACEME: Offer a conclusion

Resources

REPLACEME: Link to resorces like data sources, further discussions,


Created by Karen McAdams - Twitter | Blog | LinkedIn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment