query-be21df1f58b95b9069d629bfcafeb281

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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
select distinct ?item ?itemLabel (group_concat(distinct ?locatedLabel; separator="; ") as ?ll)
                ?image ?coordo (group_concat(distinct ?site; separator="; ") as ?sites) WHERE {

  ?item wdt:P131+ wd:Q176 ;
        wdt:P31/wdt:P279* wd:Q7075 ; 
        wdt:P17 wd:Q16 .
  ?item wdt:P131 ?located .
  optional {?item wdt:P18 ?image .}
  optional {?item wdt:P625 ?coordo .}
  optional {?item wdt:P856 ?site .}
  service wikibase:label { 
    bd:serviceParam wikibase:language "zh,fr".
    ?located rdfs:label ?locatedLabel .
    ?item rdfs:label ?itemLabel
  }
} group by ?item ?itemLabel ?image ?coordo

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?coordo"):::projected v3("?image"):::projected v1("?item"):::projected v7("?itemLabel"):::projected v8("?ll") v2("?located") v6("?locatedLabel"):::projected v5("?site"):::projected v9("?sites") a1((" ")) c14(["zh,fr"]):::literal c5(["wd:Q7075"]):::iri c7(["wd:Q16"]):::iri c12(["bd:serviceParam"]):::iri c2(["wd:Q176"]):::iri v1 --"wdt:P131"--> c2 v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c5 v1 --"wdt:P17"--> c7 v1 --"wdt:P131"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P18".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P625".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P856".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 v2 --"rdfs:label"--> v6 v1 --"rdfs:label"--> v7 end bind2[/"?locatedLabel"/] v6 --o bind2 bind2 --as--o v8 bind3[/"?site"/] v5 --o bind3 bind3 --as--o v9