MATCH (r:Role {Name: ‘Super Admin’})<-[:HAS_ROLE]-(k) RETURN k.Name, labels(k)
MATCH (r:Role {Name: ‘Super Admin’})<-[:HAS_ROLE]-(k:User)<-[:CONTAINS_USER]-(sm:SecurityMode) RETURN k.Name, sm.Name
List all databases
SHOW DATABASES
Neo4j advanced queries
Top 5 tables with most reads
MATCH (o:
and (o:Object or o:SubObject)
WITH DISTINCT r.aipLinkType as linkTypes, o, t
UNWIND linkTypes as lt WITH lt,linkTypes, o, t
MATCH(o1:) where lt = “select” and (o1:Object or o1:SubObject)
RETURN DISTINCT lt as Link Type,COUNT(DISTINCT o) as No. of Reads, t.Type as Target Type, t.FullName as Target FullName, t.Name as Target Nameorder by No. of Reads desc limit 5
Top 5 tables with most updates
MATCH (o:)-[r:USE]->(t:Object:) WHERE t.Type CONTAINS “Table”
and (o:Object or o:SubObject)
WITH DISTINCT r.aipLinkType as linkTypes, o, t
UNWIND linkTypes as lt WITH lt,linkTypes, o, t
MATCH(o1:) where lt = “update” and (o1:Object or o1:SubObject)
RETURN DISTINCT lt as Link Type,COUNT(DISTINCT o) as No. of Updates, t.Type as Target Type, t.FullName as Target FullName, t.Name as Target Nameorder by No. of Updates desc limit 5