Is it possible to query linked data with SPARQL?
For example, I have a RDF file (lets say this one) and a SPARQL query like this one:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX cc: <http://creativecommons.org/ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX s: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX con: <http://www.w3.org/2000/10/swap/pim/contact#>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
select ?friends (COUNT(?cff) as ?count_friends_of_friends) where {
?me foaf:knows ?friends .
?friends foaf:knows ?cff .
}
I didn't get any results. Does SPARQL follow linked resources? Or do I have to make multiple queries?