Start querying (also scroll down for more query examples!)
Freebase resources (also see MQL queries below)
[{
"id": null,
"name": null,
"type": "/dataworld/mass_data_operation",
"timestamp": null,
"sort": "-timestamp",
"a:operator": [{
"id": "/m/0qs4g2b",
"optional": "forbidden"
}],
"b:operator": [{
"id": "/m/0j3vmzv",
"optional": "forbidden"
}],
"c:operator": [{
"id": "/m/0j_5_4x",
"optional": "forbidden"
}],
"d:operator": [{
"id": "/m/021y7rx",
"optional": "forbidden"
}]
}]
SPARQL Resources (also see SPARQL queries below)
CAST OF ALL 1990s ROBERT DENIRO AND JOE PESCI MOVIES DIRECTED BY MARTIN SCORSESE, WITH THE NAME IN SPANISH IF POSSIBLE
[{
"a:starring": [{
"actor": "Robert de Niro"
}],
"b:starring": [{
"actor": "Joe Pesci"
}],
"c:starring": [{
"actor": null
}],
"directed_by": [{
"name": "Martin Scorsese"
}],
"initial_release_date": null,
"initial_release_date>=": "1990",
"initial_release_date<=": "1999",
"a:name": {
"value": null,
"lang": "/lang/es",
"optional": true
},
"b:name": null,
"mid": null,
"type": "/film/film"
}]
Male american actors born 1943
[{
"id": null,
"name": "actor",
"type": "/people/profession",
"people_with_this_profession": [{
"name": null,
"/people/person/nationality": [{
"id": "/en/united_states"
}],
"/people/person/gender": [{
"id": "/en/male"
}],
"/people/person/date_of_birth>=": "1943",
"/people/person/date_of_birth<": "1944",
"/people/person/date_of_birth": null
}]
}]
[{
"id": null,
"name": "actor",
"type": "/people/profession",
"people_with_this_profession": [{
"name": "Robert De Niro",
"/award/award_winner/awards_won": [{
"*": null
}]
}]
}]
[{
"id": null,
"name": null,
"type": "/event/disaster",
"fatalities": {
"value>": 10000,
"value": null
},
"sort": "-fatalities.value"
}]
SPARQL queries - Can be pasted into SPARQL or SNORQL endpoints
PREFIX : <http://dbpedia.org/resource/>
PREFIX dbprop: <http://dbpedia.org/property/>
SELECT ?movie
WHERE {
?movie dbprop:starring :Robert_De_Niro}
ORDER BY ?resource
LIMIT 100
SELECT ?subject ?label ?lat ?long WHERE {
?subject owl:sameAs <http://dbpedia.org/resource/Eiffel_Tower> .
<http://dbpedia.org/resource/Eiffel_Tower> geo:lat ?lat.
<http://dbpedia.org/resource/Eiffel_Tower> geo:long ?long.
<http://dbpedia.org/resource/Eiffel_Tower> rdfs:label ?label . }
Counting geo query results
SELECT (COUNT(*) AS ?count)
WHERE{
?place rdf:type dbpedia-owl:Place .
?place foaf:name ?title .
?place geo:lat ?geolat .
?place geo:long ?geolong .
}
Landlocked european countries with population filter
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX type: <http://dbpedia.org/class/yago/>
PREFIX prop: <http://dbpedia.org/property/>
SELECT ?country_name ?population
WHERE {
?country a type:LandlockedCountries ;
rdfs:label ?country_name ;
prop:populationEstimate ?population .
FILTER (?population > 15000000 && LANG(?country_name)='en') .
}
SELECT ?p ?o WHERE
{
<http://nasa.dataincubator.org/spacecraft/1968-089A> ?p ?o
}
Movies, english descriptions
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?film ?description ?film_name WHERE {
?film rdf:type <http://dbpedia.org/ontology/Film>.
?film foaf:name ?film_name.
?film rdfs:comment ?description .
FILTER (LANG(?description)='en')
}
LIMIT 100
SELECT ?property ?hasValue ?isValueOf
WHERE {
{ <http://dbpedia.org/resource/Alan_Alda> ?property ?hasValue }
UNION
{ ?isValueOf ?property <http://dbpedia.org/resource/Alan_Alda> }
}
(COUNT(DISTINCT ?instance) AS ?count)
PREFIX dbowl: <http://dbpedia.org/ontology/>
PREFIX dbpprop: <http://dbpedia.org/property/>
PREFIX dbres: <http://dbpedia.org/resource/>
SELECT ?y ?z WHERE {
?z a dbowl:SpaceMission
}
limit 10
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX yago: <http://dbpedia.org/class/yago/>
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
SELECT ?place WHERE {
?place rdf:type yago:EuropeanCountries .
?place rdf:type dbpedia-owl:Country
}
Pablo Picasso painting locations (factforge)
# Cities where paintings of Picasso are located (PROTON)
PREFIX dbpedia: <http://dbpedia.org/resource/>
PREFIX ff: <http://factforge.net/>
PREFIX ptop: <http://www.ontotext.com/proton/protontop#>
PREFIX pext: <http://www.ontotext.com/proton/protonext#>
SELECT DISTINCT ?painting_l ?owner_l ?city_l
WHERE {
?painting pext:authorOf dbpedia:Pablo_Picasso.
?painting ptop:isOwnedBy ?owner ; ff:preferredLabel ?painting_l.
?owner ff:preferredLabel ?owner_l .
?owner ptop:locatedIn ?city.
?city a pext:City ; ff:preferredLabel ?city_l .
OPTIONAL { ?city ptop:subRegionOf ?otherLoc. ?owner ptop:locatedIn
?otherLoc. ?otherLoc a pext:City }
FILTER (!bound(?otherLoc))
}