6.4. Co-favorited places

Figure 6.4. Graph

Co-favorited places — users who like x also like y

Find places that people also like who favorite this place:

  • Determine who has favorited place x.
  • What else have they favorited that is not place x.

Parameters 

{ }

Query 

MATCH (place)<-[:favorite]-(person)-[:favorite]->(stuff)
WHERE place.name = 'CoffeeShop1'
RETURN stuff.name, count(*)
ORDER BY count(*) DESC , stuff.name

The list of places that are favorited by people that favorited the start place.

Result

stuff.namecount(*)
3 rows

"MelsPlace"

2

"CoffeShop2"

1

"SaunaX"

1