title: How to get recommendations based on previous orders in neo4j?
body: <p>I am trying to work on neo4j for the first time. I have written the following:</p>
  <pre><code>LOAD CSV WITH HEADERS FROM &quot;file:///restaurant_data.csv&quot; AS data
  MERGE(n1:Customer{Name:data.Name, Latitude:toFloat(data.Latitude),Longitude:toFloat(data.Longitude)})
  MERGE(n2:Orders{OrderId:data.Order_ID,OrderTimestamp:data.Order_ts,FoodName:data.Food_Item})
  MERGE(n3:Restaurant{RestaurantName:data.Restaurant, RestLat:toFloat(data.Rest_lat), RestLong:toFloat(data.Rest_long)})
  MERGE (n1)-[r1:PLACES_ORDER]-&gt;(n2)
  MERGE (n2)-[r2:BELONGS_TO]-&gt;(n3)
  MERGE (n3)-[r3:SERVES]-&gt;(n2)
  RETURN *;
  </code></pre>
  <p>i can share the csv if needed.</p>
  <p>I want to find recommendation of restaurant for customer based on his top 5 previous orders by order_timestamp and distance between restaurant and customer should be less than 5 kms.</p>
  <pre><code>MATCH(n1:Customer{Name:&quot;Angy&quot;})
  MATCH(n1)-[:PLACES_ORDER]-&gt;(n2:Orders)&lt;-[:SERVES]-(rec:Restaurant)
  RETURN n2.FoodName, n2.OrderTimestamp, n3.RestaurantName
  ORDER BY n2.OrderTimestamp
  LIMIT 5
  </code></pre>
  <p>This gives me only top 5 orders, how do I find restaurants serving those orders?</p>
  <p>My file link: <a href="https://docs.google.com/spreadsheets/d/e/2PACX-1vTc35TBanV3Uk5gbCeEFeJkm2YAhbJPLnpS0KzmYErVRulvbXCWdSZ7xiKUfnCZQQUt-1ArabgmAGmL/pubhtml" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/e/2PACX-1vTc35TBanV3Uk5gbCeEFeJkm2YAhbJPLnpS0KzmYErVRulvbXCWdSZ7xiKUfnCZQQUt-1ArabgmAGmL/pubhtml</a></p>