Hi All, 

So here is the senario,

1. Customer A places items into his/her basket
2. Other customers place items into their baskets.
3. Find the items in the "other" baskets that are not in customer A's basket

Everything seems find until the point where i need to filter out customer 
A's items.


START c = node(84531)
MATCH (c)-[:BasketContained]->
(:TransactionLineItems)
-[:IsOneOf]->
(s:StoreItem)
<-[:IsOneOf]-
(tl:TransactionLineItems)
<-[:BasketContained]-
(m:StoreCutomerTransaction)
WHERE   
m.Month = 10 
and m.Year = 2015 
and m.Day = 29
WITH distinct s, m, c
Match (m)
-[:BasketContained]->
(:TransactionLineItems)
-[:IsOneOf]->
(RecomendedItems:StoreItem)
WITH RecomendedItems, c
MATCH (RecomendedItems)
MATCH (c)
WHERE NOT 
exists((RecomendedItems)-[:IsOneOf]->(:TransactionLineItems)-[:BasketContained]->(c))
RETURN RecomendedItems.ItemName, COUNT(RecomendedItems.ItemName) AS 
CountRecomendedItems
Order by CountRecomendedItems desc

Any help would be appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to