query-360858e8ad068c55d11908e98d17143b

rq turtle/ttl

.(Q60178280)36C3 at Operation Mindfuck Vol. 3. Inspired by on Mastodon and on TwitterOriginally posted

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?uninteresting WHERE {
  # natural number
  ?item p:P31 ?statement.
  ?statement ps:P31 wd:Q21199.
  # not said to be the same as another (e. g. 0.999…)
  MINUS { ?item wdt:P460 ?duplicate. }
  # with a numeric value
  ?item wdt:P1181 ?value.
  # that’s not unknown (e. g. Graham’s number)
  FILTER(!wikibase:isSomeValue(?value))
  # its successor
  BIND(?value + 1 AS ?uninteresting)
  # is neither linked in the P31 statement
  MINUS { ?statement pq:P156 ?successor. }
  # nor otherwise existing
  MINUS { ?otherItem wdt:P1181 ?uninteresting. }
}
ORDER BY ASC(?value)
LIMIT 1

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?duplicate") v2("?item") v7("?otherItem") v3("?statement") v6("?successor") v5("?uninteresting"):::projected v1("?value") c3(["wd:Q21199"]):::iri f0[["not http://wikiba.se/ontology#isSomeValue(?value)"]] f0 --> v1 v2 --"p:P31"--> v3 v3 --"p:statement/P31"--> c3 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v2 --"p:direct/P460"--> v4 end v2 --"p:direct/P1181"--> v1 bind2[/"?value + '1^^xsd:integer'"/] v1 --o bind2 bind2 --as--o v5 subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; v3 --"p:qualifier/P156"--> v6 end subgraph minus4["MINUS"] style minus4 stroke-width:6px,fill:pink,stroke:red; v7 --"p:direct/P1181"--> v5 end