generated from FacultadInformatica-LinkedData/Template-Curso
-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathrafata8-assignment_3.txt
81 lines (61 loc) · 1.48 KB
/
rafata8-assignment_3.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
####assignment 3
# Rafael Timermans Díez
-------------------------------- 1 ------------------------
PREFIX pol: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?y
WHERE
{
?y rdfs:domain pol:Politician
}
LIMIT 100
### its not recursive so i guess that the query only gives me the results that only the politician has,
###but not more general liker person
#easier one would be this, but its only the instances, not all the posibilities
PREFIX pol: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?x
WHERE
{
?y a pol:Politician.
?y ?x ?z
}
LIMIT 100
----------------------------------- 2 ----------------------------------
PREFIX pol: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?x
WHERE
{
?y a pol:Politician.
?y ?x ?z.
FILTER (?x != rdf:type)
}
LIMIT 100
----------------------------------- 3 -------------------------------------
PREFIX pol: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?val
WHERE
{
?x a pol:Politician.
?x ?y ?val.
FILTER (?y != rdf:type)
}
LIMIT 100
----------------------------------- 4 --------------------------------------
PREFIX pol: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?prop ?val
WHERE
{
?x a pol:Politician.
?x ?prop ?val.
FILTER (?prop != rdf:type)
}
LIMIT 100
----------------------------- 5 ----------------------------
PREFIX pol: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?prop COUNT( DISTINCT ?val)
WHERE
{
?x a pol:Politician.
?x ?prop ?val.
FILTER (?prop != rdf:type)
}
LIMIT 100