query-cab33215cc61e071da1985e0020478f7
Query to return all RALUse this query to see all RAL codes, with country and jurisdiction:
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
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 ?co ?jurLabel ?ral ?item ?itemLabel WHERE {
?item p:P9487 ?stat.
?stat ps:P9487 ?ral
optional {?item wdt:P17/wdt:P297 ?co}
optional {?stat pq:P1001 ?jur1}
optional {?item wdt:P1001 ?jur2}
bind(coalesce(?jur1,?jur2) as ?jur)
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,bg,no,nn,nb" } .
} order by ?co ?jurLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?co"):::projected
v3("?item"):::projected
v8("?jur")
v6("?jur1")
v7("?jur2")
v2("?jurLabel"):::projected
v5("?ral"):::projected
v4("?stat")
a1((" "))
c8(["bd:serviceParam"]):::iri
c10(["en,bg,no,nn,nb"]):::literal
v3 --"p:P9487"--> v4
v4 --"p:statement/P9487"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P17".-> a1
a1 --"p:direct/P297"--> v1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P1001".-> v6
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P1001".-> v7
end
bind0[/"?jur1?jur2"/]
v6 --o bind0
v7 --o bind0
bind0 --as--o v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end