Some times ago, we started to collect example SPARQL queries of interest through twitter, using the hashtag #queryou. This page is here to keep track of the queries collected, and to discuss them. Please fell free to contribute by sending your query on twitter using the #queryou tag.

Courses available in Nigeria

This query lists all the Open University courses that can currently be registered to from Nigeria.

select distinct ?course where {
?course <http://data.open.ac.uk/saou/ontology#isAvailableIn> <http://sws.geonames.org/2328926/>.
?course a <http://purl.org/vocab/aiiso/schema#Module>}

(see the results)

Things related to Earthquakes

This query find any video podcast and OpenLearn units which descriptions contain the term “earthquake”.

select ?c ?desc where {
?c <http://purl.org/dc/terms/description> ?desc .
{ {?c <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.open.ac.uk/openlearn/ontology/OpenLearnUnit>}
UNION
{?c <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.open.ac.uk/podcast/ontology/VideoPodcast>} }
FILTER regex(str(?desc), "earthquake", "i" )}

(see the results)

Subjects of Podcasts

Subject headings used to describe a specific podcast (@psychemedia).

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select distinct ?s ?x ?y {
<http://data.open.ac.uk/podcast/9687b84ab18c389aace5b9fecdb42457> ?s rdfs:label ?y }

(see the results)

Subject headings used to describe all podcasts (@ppetej).

PREFIX rdf:
PREFIX rdfs:
PREFIX xsd:
PREFIX dcterms:
PREFIX skos:

SELECT DISTINCT ?tlabel
WHERE {
{?x a <http://data.open.ac.uk/podcast/ontology/VideoPodcast> ;
dcterms:subject ?t .
?t rdfs:label ?tlabel }
UNION
{?x a <http://data.open.ac.uk/podcast/ontology/AudioPodcast> ;
dcterms:subject ?t .
?t rdfs:label ?tlabel } }

(see the results)

Course offers and prices

Prices (ordered) with currency of OU level 1 courses in Arts and Humanities as available in France.

select ?course ?price ?cur
where {
?course <http://data.open.ac.uk/saou/ontology#OUCourseLevel> "1"^^<http://www.w3.org/2001/XMLSchema#string>.
?course <http://purl.org/dc/terms/subject> <http://data.open.ac.uk/topic/arts_and_humanities>.
?off <http://purl.org/goodrelations/v1#includes> ?course.
?off <http://purl.org/goodrelations/v1#hasPriceSpecification> ?ps.
?course <http://data.open.ac.uk/saou/ontology#isAvailableIn> <http://sws.geonames.org/3017382/>.
?off <http://purl.org/goodrelations/v1#availableAtOrFrom> <http://sws.geonames.org/3017382/>.
?ps <http://purl.org/goodrelations/v1#hasCurrencyValue> ?price.
?ps <http://purl.org/goodrelations/v1#hasCurrency> ?cur
} order by ?price

(see the results)

Course related podcasts

Video podcasts related to postgraduate courses in computing.

select ?x ?t
where {
?c <http://purl.org/dc/terms/subject> <http://data.open.ac.uk/topic/computing>.
?c <http://data.open.ac.uk/saou/ontology#courseLevel> <http://data.open.ac.uk/saou/ontology#postgraduate>.
?x <http://data.open.ac.uk/podcast/ontology/relatesToCourse> ?c.
?x <http://purl.org/dc/terms/title> ?t.
?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.open.ac.uk/podcast/ontology/VideoPodcast>}

(see the results)

Course topic and availability

Spanish courses available in Germany.

SELECT DISTINCT ?c WHERE {
?c <http://purl.org/dc/terms/subject> <http://data.open.ac.uk/topic/spanish> .
?c <http://data.open.ac.uk/saou/ontology#isAvailableIn> <http://sws.geonames.org/2921044/> . }

(see the results)

People names

People with more than one family name in ORO.

select distinct ?x ?y ?z where {
?x <http://xmlns.com/foaf/0.1/family_name> ?y.
?x <http://xmlns.com/foaf/0.1/family_name> ?z.
filter(?y != ?z) }

(see the results)