query-53a79bce27f753c88bb8a1989508de86

rq turtle/ttl

TODO

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?image ?label WHERE {
   {
  SELECT ?item (SAMPLE(?p18) AS ?image) {
    ?item wdt:P31/wdt:P279* wd:Q31629 .
    OPTIONAL { ?item wdt:P18 ?p18 } .
  } GROUP BY ?item
}.
  ?item rdfs:label ?label .
  FILTER ( LANG( ?label ) = "en" ) .
  #FILTER ( STRSTARTS( LCASE( ?label ), "bo" ) ) .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?image"):::projected v2("?item"):::projected v1("?label"):::projected v3("?p18") a1((" ")) c4(["wd:Q31629"]):::iri f0[["?label = 'en'"]] f0 --> v1 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P18".-> v3 end bind2[/"sample(?p18)"/] v3 --o bind2 bind2 --as--o v4 v2 --"rdfs:label"--> v1