我有2个节点标签:帐户,交易。
MATCH (n:Account)
RETURN n
使用此属性返回4个帐户:
accountName RAHUL RAINA
id 16294736
accountName SAVINGS ACCOUNT - RES
id 16294732
accountName VISA GOLD
id 16294492
accountName SBCHQ-GEN-PUB-IND-NONRURAL-INR
id 16294488
交易是这样的:
MATCH (n:Transaction)
RETURN n LIMIT 5
这会让我回头:
id 133817384
description ATM07JUN15 NFS 11:38:44A96103218ATM
postedDate 6/8/2015
transactionDate 6/8/2015
accountId 16294732
id 133815940
description TO TRANSFER INB Tinyowl Technology Privat
postedDate 6/8/2015
transactionDate 6/8/2015
accountId 16294488
我想在transaction.accountId == account.id
我该怎么做。
答案 0 :(得分:2)
MATCH (a:Account), (t:Transaction)
WHERE a.id = t.accountId
CREATE (t)-[:FROM_ACCOUNT]->(a)