query-44adb64044631df09a629299da5e9dcb

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel WHERE {
   SERVICE bd:sample {
     ?item wdt:P31 wd:Q5 .
     bd:serviceParam bd:sample.limit 100000 .
     bd:serviceParam bd:sample.sampleType "RANDOM" .
   }
   MINUS {?item wdt:P569 []} .
   MINUS {?item wdt:P570 []} .
   OPTIONAL {?item wdt:P373 ?commonscat} .
   OPTIONAL {
      ?commons schema:about ?item .
      ?commons schema:isPartOf <https://commons.wikimedia.org/> .
   }
   FILTER(bound(?commonscat)|| bound(?commons)) . 
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?commons") v1("?commonscat") v3("?item"):::projected a1((" ")) a2((" ")) c8(["RANDOM"]):::literal c14([https://commons.wikimedia.org/]):::iri c6(["100000^^xsd:integer"]):::literal c4(["bd:serviceParam"]):::iri c3(["wd:Q5"]):::iri c17(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["(bound(?commonscat) || bound(?commons))"]] f0 --> v1 f0 --> v2 subgraph s1["http://www.bigdata.com/rdf#sample"] style s1 stroke-width:4px; v3 --"wdt:P31"--> c3 c4 --"bd:sample.limit"--> c6 c4 --"bd:sample.sampleType"--> c8 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P569"--> a1 end subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P570"--> a2 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P373".-> v1 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."schema:about".-> v3 v2 --"schema:isPartOf"--> c14 end subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c4 --"wikibase:language"--> c17 end