Here is a SPARQL query to list all movies directed by directors from the USA along with their director names:
SELECT ?movieName ?directorName
WHERE {
?movie :directedBy ?director .
?director :Country "USA" .
?director :name ?directorName .
?movie :name ?movieName
}
PalGov © 2011 10
Example
• Q4: List all the movies directed by Michael Moore and their years.
SELECT ?movieName ?year
WHERE {
?movie :directedBy :Michael_Moore .
?movie :name ?movieName .
?movie :year ?year
}
This query finds all movies