MATCH (n) WHERE n.Type IN ['x', 'y']
WITH n OPTIONAL MATCH (f)-[:PART_OF]->(n)
WITH n, COLLECT({ftype: f.Type, fsubtype:f.SubType, flocalipaddr: f.LocalIpAddr, fip: f.IP, fremotetunnelendpoint: f.RemoteTunnelEndpoint, fpeername: f.PEERNAME}) AS fcp
WITH n, fcp, [x IN fcp WHERE x.ftype = 'IKEP' AND x.fsubtype = 'Security Gateway' and n.SubType = 'eNodeB'| x.fpeername] AS fpeername,
[x IN fcp WHERE x.ftype = 'DEVIP' AND x.fsubtype = 'SYNC' and n.SubType = 'eNodeB'| x.fip] AS fip
RETURN 'Base Station' AS OptType, n.SubType, fpeername[0], fip[0]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…