Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
Let's FILTER some results
Cleaner explanations will be available soon.
General filtering structure
Who are the actors born before 1960?
1
2
3
4
5
6
7
8
9
10
PREFIX yaco: <https://www.irit.fr/recherches/MELODI/ontologies/cinema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?name
WHERE {
?actor rdf:type yaco:Actor;
rdfs:label ?name;
yaco:birthYear ?year.
FILTER(?year < 1960)
}
Press desired key combination and then press ENTER.
1
@prefix yaco: <https://www.irit.fr/recherches/MELODI/ontologies/cinema#> .
Press desired key combination and then press ENTER.
Filtering with functions
Are mail addresses usable as is?
1
2
3
4
5
6
7
8
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name ?mbox
WHERE {
?x foaf:name ?name ;
foaf:mbox ?mbox .
FILTER isIRI(?mbox)
}
Press desired key combination and then press ENTER.
1
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
Press desired key combination and then press ENTER.
Filtering with language
Who has a spanish name?
1
2
3
4
5
6
7
8
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name ?mbox
WHERE {
?x foaf:name ?name ;
foaf:mbox ?mbox .
FILTER ( lang(?name) = "ES" )
}
Press desired key combination and then press ENTER.
1
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
Press desired key combination and then press ENTER.
Filtering with datatypes
Who uses european shoe size?
1
2
3
4
5
6
7
8
9
10
11
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX eg: <http://example.org/ns#>
SELECT ?name ?shoeSize
WHERE {
?x foaf:name ?name ;
eg:shoeSize ?shoeSize .
FILTER ( datatype(?shoeSize) = xsd:integer )
}
Press desired key combination and then press ENTER.
1
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
Press desired key combination and then press ENTER.
Filtering by inclusion
What are the movies directed by Lilly Wachowski or Tom Tyker?
1
2
3
4
5
6
7
PREFIX yaco: <https://www.irit.fr/recherches/MELODI/ontologies/cinema#>
SELECT ?movie
WHERE {
?director yaco:directed ?movie.
FILTER(?director in (:LillyWachowski, :TomTykwer))
}
Press desired key combination and then press ENTER.
1
@prefix yaco: <https://www.irit.fr/recherches/MELODI/ontologies/cinema#> .
Press desired key combination and then press ENTER.
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content