query-85be43e99bae01f7063a9e244c8f1f1c

rq turtle/ttl

CountyLabelHi, I want the countyLabel collumn to show the label of the county. Anyone could help? Thanks. Tom https://w.wiki/X5v17:07, 16 July 2020 (UTC)) talk (Dipsacus fullonum and the label will automatically be used in the results. --OPTIONAL { ?item wdt:P131 ?county.} to OPTIONAL { ?item wdt:P131 ?countyLabel.}: Hi, Change TomiCzech@Maybe

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#>
#defaultView:Table
SELECT ?item ?itemLabel ?pic ?gps ?countyLabel
WHERE 
{
  ?item wdt:P31 wd:Q40080. #pláž
  ?item wdt:P17 wd:Q224.   #chorvatsko
  ?item wdt:P625 ?gps.   #gps
  OPTIONAL { ?item wdt:P18 ?pic. }
  OPTIONAL { ?item wdt:P131* ?county . ?county wdt:P31 wd:Q57053 }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],hr,en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?county") v2("?gps"):::projected v1("?item"):::projected v3("?pic"):::projected c8(["wd:Q57053"]):::iri c2(["wd:Q40080"]):::iri c4(["wd:Q224"]):::iri c10(["bd:serviceParam"]):::iri c12(["#91;AUTO_LANGUAGE#93;,hr,en"]):::literal v1 --"wdt:P31"--> c2 v1 --"wdt:P17"--> c4 v1 --"wdt:P625"--> 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:P131".-> v4 v4 --"wdt:P31"--> c8 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end