I am trying to fetch a list of American movies adapted from books from dbpedia. This is what I have so far:
PREFIX onto:
First thing, try removing the second line of your pattern --
?movie dcterms:subject <http://dbpedia.org/resource/Category:Films_based_on_novels> .
You'll get a great many more results from --
PREFIX onto: <http://dbpedia.org/ontology/>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT * WHERE
{
?movie dcterms:subject <http://dbpedia.org/resource/Category:American_films> ;
onto:basedOn ?book .
?book a onto:Book .
}
Have you looked at the descriptions of the results you did get? That will show you the properties you might use...
Remember that you're limited by the data in DBpedia, which may not have what you think it should (for instance, not every film based on a novel is explicitly categorized as such, as you can see by the different results I got), and may also be 6 or more months out of sync with Wikipedia. You might look at DBpedia-live, for constantly updated ingestion.