query-963f43a8b836e65894a2b57273a4273e
Query #12: The emergency #'s in each country, and who they callAn example of use of statement qualifiers, in this case P366 'use'.
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?countryLabel ?numLabel ?useLabel WHERE {
{?country wdt:P31 wd:Q6256}
UNION {?country wdt:P31 wd:Q3624078} .
?country p:P2852 ?number .
?number ps:P2852 ?num .
?number pq:P366 ?use .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY ?countryLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?country")
v1("?countryLabel"):::projected
v4("?num")
v3("?number")
v5("?use")
c3(["wd:Q3624078"]):::iri
c8(["bd:serviceParam"]):::iri
c10(["en"]):::literal
c2(["wd:Q6256"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P31"--> c3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P31"--> c2
end
union0r <== or ==> union0l
end
v2 --"p:P2852"--> v3
v3 --"p:statement/P2852"--> v4
v3 --"p:qualifier/P366"--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end