query-21c6afb39fbb8879310e92ddfce5b106
Item from website URLHi everyone, I would like to get wikidata entries of some websites. For instance if the website is bbc.com, the SPARQL query should return the entity of BBC. I built the following query according to the examples on Wikidata, however I can not get any results. I removed the filter condition, and got the official websites. But with filter, the result is empty. What could be the problem? Thanks
Use at
- https://query.wikidata.org/sparql
 
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?websiteLabel WHERE {
  ?item wdt:P856 ?website.
  ?website rdfs:label ?websiteLabel .
  FILTER CONTAINS(LCASE(?websiteLabel), 'bbc.com' ).
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
LIMIT 10
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?item"):::projected 
  v3("?website")
  v1("?websiteLabel"):::projected 
  c5(["bd:serviceParam"]):::iri 
  c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal 
  f0[["contains(lower-case(?websiteLabel),'bbc.com')"]]
  f0 --> v1
  v2 --"wdt:P856"-->  v3
  v3 --"rdfs:label"-->  v1
  subgraph s1["http://wikiba.se/ontology#label"]
    style s1 stroke-width:4px;
    c5 --"wikibase:language"-->  c7
  end