Hi I have 2 sets of labels in neo4j 3.03:-
INTERACTIONS
uidpid 100000060085836_170782808933_10154454374183934
name Dean Hohaia
postid 170782808933_10154454374183934
pageid 170782808933
userid 100000060085836
POSTS
shares 0
comments 0
postid 100129044360_100138063361365
pageid 100129044360
type link
createdtime 2010-03-30 00:43:23
pagename Study in New Zealand
likes 4
I have a relationship called LIKES which has been created likes this:-
MATCH (i:interactions),(p:posts)
WHERE i.userid = p.userid
CREATE (i)-[:likes]->(p)
which look like this:
uidpid 613637235481924_125251397514429_1000501533322740
name Toth Mariann
postid 125251397514429_1000501533322740
pageid 125251397514429
userid 613637235481924
same as interactions basically.
I need to find a way to create a query that shows:-
for each pagename in posts, show count of userid interactions by pagename:-
Source Pagename Matched Pagename Userids count #
Air New Zealand Rialto Channel 12494
Air New Zealand RNZ 2979
Air New Zealand SKY TV 4651
In essence - for each pagename in posts, show the count of all other pages that each user has engaged with.
Do I need to create any other relationships to achieve this?
Here's the exact, example data I'm using as CSV's https://www.wetransfer.com/downloads/37e89c65f029344a2205ca717f04b6fe20161024051807/0d4ab3