query-21be3361aa05c4c11d89550428225b4c

rq turtle/ttl

Please restore an example to SPARQL examples or update the tutorial 11:14, 9 December 2022 (UTC)) talk (Piotrus. My students were doing this tutorial recently and we noticed this example has been removed from the, well, list of examples, so this part of the tutorial is broken. I have the feeling someone thought this example was silly (“Even more cats, with pictures”) and didn't realize it was used in this tutorial. Can someone fix it, by either restoring the example or changing the example in the tutorial? (I'd restore it myself but I have no idea where the relevant code is...). Wikidata talk:SPARQL query service/A gentle introduction to the Wikidata Query ServiceSee I restored the query from the screenshot. Although it seems that query had been deleted for years now, I went as far back as 2018 but it wasn't in the examples wiki page.

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Even more cats, with pictures
#defaultView:ImageGrid
SELECT ?item ?itemLabel ?pic WHERE {
  ?item ?xl wd:Q146.
  OPTIONAL { ?item wdt:P18 ?pic. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v3("?pic"):::projected v2("?xl") c1(["wd:Q146"]):::iri c4(["bd:serviceParam"]):::iri c6(["en"]):::literal v1 -->v2--> c1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P18".-> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end