CREATE TABLE Employee (
id int primary key,
name varchar(255) not null,
manager_id int
);
Slide 10
Slide 10 text
SELECT m.name
FROM Employee e
INNER JOIN Employee m
ON e.manager_id = m.id
WHERE e.id = 100;
Slide 11
Slide 11 text
WITH RecursiveCte AS (
SELECT e.id, e.name
FROM Employee e
WHERE parent_id = 100
UNION ALL
SELECT e.id, e.name
FROM Employee e
INNER JOIN RecursiveCte rcte
ON e.parent_id = rcte.id
)
SELECT Name FROM RecursiveCte;
Slide 12
Slide 12 text
No content
Slide 13
Slide 13 text
MATCH
(e { id: 100 })-[:MANAGED_BY]->(m)
RETURN m.name;
Slide 14
Slide 14 text
MATCH
(m { id: 100 })<-[:MANAGED_BY*]-(e)
RETURN e.name;
Slide 15
Slide 15 text
MATCH
(m { id: 100 })<-[:MANAGED_BY*]-(e)
RETURN e.name;