4

I have this SPARQL query to return an item's label and the url of a Wikipedia article:

PREFIX schema: <http://schema.org/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?article ?itemLabel WHERE
    { FILTER ( ?item = wd:Q10000000 )
      ?article  schema:about       ?item ;
                schema:inLanguage  "en" ;
                schema:isPartOf    <https://en.wikipedia.org/> .

      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }

This works as expected, but as soon as I substitute the id with Q10000000 or any higher number included, it yields no result. Not only to the entities I checked exist, but also does the query editor display a label when hovering over the id in that expression.

What is causing this behaviour and how can I adjust the query to get results for entities with ids that have an id of Q10000001 and higher?

4

There isn't an article about Татьяна Колотильщикова in English Wikipedia.

Just comment out the second and the third triple patterns in your query.

Or try e. g. Q11000001 instead of Q10000001.

  • funny thing is that i ended with that apparent cut-off value with trying some ids between my initial problem (without an article) and 10000000. – funky-future May 2 '18 at 21:58
  • @funky-future, wd:Q10000017 seems to be the nearest one. – Stanislav Kralin May 2 '18 at 23:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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