query-92f1c91bb4eb28411c7db94c45718769
All HASC Data with 5 characters
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#-----------------------------------------------------
# All HASC Data in Wikidata with 5 characters
#-----------------------------------------------------
#defaultView:Map;Table
SELECT ?hasc ?item ?itemLabel ?itemDescription ?countryLabel ?coordinate
WHERE
{
?item wdt:P8119 ?hasc . # hasc
FILTER(REGEX(STR(?hasc), "^[A-Z]{2}.[A-Z]{2}$","i"))
OPTIONAL { ?item wdt:P625 ?coordinate. } # coordinate
OPTIONAL { ?item wdt:P17 ?country. } # country
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de". }
}
order by ?hasc
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?coordinate"):::projected
v4("?country")
v1("?hasc"):::projected
v2("?item"):::projected
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en,de"]):::literal
f0[["regex(str(?hasc),'^#91;A-Z#93;{2}.#91;A-Z#93;{2}$','i')"]]
f0 --> v1
v2 --"wdt:P8119"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P625".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P17".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end