-
Notifications
You must be signed in to change notification settings - Fork 1
/
cypher code.txt
50 lines (36 loc) · 1.29 KB
/
cypher code.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
load csv with headers from"file:///resumetriples.csv"as row
MERGE(s:Subject{name:row.subject})
MERGE(o:Object{skills:row.object})
MERGE(o)-[:PREDICATE{relates:row.relation}]->(s)
return s,p,o
MATCH (o:Object)-[p:PREDICATE]-(s:Subject) where p.relates = "skilled at"
return s.name as name,o.skills as skills
MATCH (o:Object) - [p:PREDICATE{relates:"skilled at"}] - (s:Subject)
RETURN s.name, COUNT(p) as total_skills
ORDER BY total_skills DESC
MATCH (o:Object) - [p:PREDICATE] -> (s:Subject)
WHERE o.skills = "Power BI"
RETURN s.name as name
MATCH (o:Object) - [p:PREDICATE{relates:"skilled at"}] - (s:Subject)
with s.name as name,count(p) as total_skills
where total_skills>4
RETURN name
MATCH (o:Object) - [p:PREDICATE] -> (s:Subject)
WHERE o.skills = "Spark" or o.skills="SQL"
RETURN s.name as name
MATCH (o:Object) - [p:PREDICATE{relates:"works at"}] - (s:Subject)
where o.skills="Insight"
RETURN s.name as name
MATCH (o:Object) - [p:PREDICATE{relates:"skilled at"}] - (s:Subject)
RETURN s.name, COUNT(p) as total_skills
ORDER BY total_skills DESC
limit 2
MATCH (o:Object)-[p:PREDICATE{relates:"skilled at"}]-(s:Subject)
RETURN o.skills as skill, count(o) as freq
ORDER BY freq DESC