2

I've this query but I can't understand why doesn't return any result. I try different versions (with link, with only code, with wd:code) but nothing seems to work. What I need is this query but searching by code (like the eg., Q6015113)

              SELECT ?item ?itemLabel WHERE {

 ?item wdt:P31 wd:Q5.
  FILTER (?item = "http://www.wikidata.org/entity/Q6015113")
 SERVICE wikibase:label { bd:serviceParam wikibase:language "es,en,fr" . }
} ORDER BY ASC(?num)

1 Answer 1

4

In short, URIs are "things, not strings". The filtering condition should be:

  • ?item = <http://www.wikidata.org/entity/Q6015113>, or
  • ?item = wd:Q6015113, or
  • ?item = URI("http://www.wikidata.org/entity/Q6015113").

There also exists the VALUES keyword for providing inline data.

5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.