Kingsley Idehen wrote: > Ed Summers wrote: >> I was just playing around w/ some SPARQL using dbpedia's endpoint and >> noticed that: >> >> SELECT * >> WHERE { >> ?person rdf:type <http://dbpedia.org/ontology/Person> . >> ?person rdfs:label ?personName . >> ?person <http://dbpedia.org/ontology/birthplace> ?place . >> ?place rdfs:label ?placeName . >> FILTER (lang(?personName) = "en") >> FILTER (lang(?placeName) = "en") >> } >> >> returns some hits but this returns 0: >> >> SELECT COUNT(*) >> WHERE { >> ?person rdf:type <http://dbpedia.org/ontology/Person> . >> ?person rdfs:label ?personName . >> ?person <http://dbpedia.org/ontology/birthplace> ?place . >> ?place rdfs:label ?placeName . >> FILTER (lang(?personName) = "en") >> FILTER (lang(?placeName) = "en") >> } >> >> Is there something wrong here either in my query or my expectation >> that the count query return > 0 ? >> >> //Ed >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus >> on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Dbpedia-discussion mailing list >> Dbpedia-discussion@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion >> >> > Ed, > > It's your query, you need optionals in there. Here is a quick mod that > focuses on the typical culprits (rdfs:label values): > > SELECT COUNT(*) > WHERE { > ?person rdf:type <http://dbpedia.org/ontology/Person> . > optional {?person rdfs:label ?personName} . > ?person <http://dbpedia.org/ontology/birthplace> ?place . > optional {?place rdfs:label ?placeName} . > FILTER (lang(?personName) = "en") > FILTER (lang(?placeName) = "en") > }
Kingsley, can you explain this further? If Ed's original query (no optionals) returns results, why would the same query with COUNT(*) return zero? Lee ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Dbpedia-discussion mailing list Dbpedia-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion