- Author: Eduard Aymerich
###################################################################
- Get all the properties that can be applied to instances of the Politician class (http://dbpedia.org/ontology/Politician)
PREFIX ex: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?p
WHERE
{
?x a/rdfs:subClassOf* ex:Politician.
?x ?p ?y
}
LIMIT 100
################################################################### 2. Get all the properties, except rdf:type, that can be applied to instances of the Politician class
PREFIX ex: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?p
WHERE
{
?x a/rdfs:subClassOf* ex:Politician.
?x ?p ?y
FILTER(?p != rdf:type)
}
LIMIT 100
################################################################### 3. Which different values exist for the properties, except rdf:type, of the instances of the Politician class?
PREFIX ex: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?v
WHERE
{
?x a/rdfs:subClassOf* ex:Politician.
?x ?p ?v
FILTER(?p != rdf:type)
}
LIMIT 100
################################################################### 4. For each of the properties, except rdf:type, that can be applied to instances of the Politician class, which different values do they take in those instances?
PREFIX ex: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?p ?v
WHERE
{
?x a/rdfs:subClassOf* ex:Politician.
?x ?p ?v
FILTER(?p != rdf:type)
}
LIMIT 100
################################################################### 5. For each of the properties, except rdf:type, that can be applied to instances of the Politician class, how many distinct values do they take in those instances?
PREFIX ex: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?p COUNT(?v)
WHERE
{
?x a/rdfs:subClassOf* ex:Politician.
?x ?p ?v
FILTER(?p != rdf:type)
}
LIMIT 100