Question: How many rivers and lakes are in South Carolina?
SPARQL:
PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbr: <http://dbpedia.org/resource/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dct: <http://purl.org/dc/terms/> PREFIX dbc: <http://dbpedia.org/resource/Category:> select (COUNT(distinct ?uri) as ?count) where { { ?uri dbo:location dbr:South_Carolina . ?uri rdf:type dbo:Lake . } UNION { ?uri dct:subject dbc:Rivers_and_streams_of_South_Carolina . } }