Skip to main content
Tweeted twitter.com/StackOpenData/status/992440039811485697
Link changed
Source Link

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 editorquery 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?

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?

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?

Source Link

Why does Wikidata's query interface return no results for entities with an id of Q10000001 or higher?

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?