query-726bb2918ebc26b2c82401fd99e85837
TODO
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 ?country ?countryLabel ?religion ?religionLabel ?proportion ?percentage WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?country wdt:P31 wd:Q3624078.
OPTIONAL
{
?country p:P140 ?stm.
?stm ps:P140 ?religion.
OPTIONAL
{
?stm pq:P1107 ?proportion.
BIND (?proportion * 100 AS ?percentage)
}
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?country"):::projected
v5("?percentage"):::projected
v4("?proportion"):::projected
v3("?religion"):::projected
v2("?stm")
c2(["bd:serviceParam"]):::iri
c6(["wd:Q3624078"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v1 --"p:direct/P31"--> c6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:P140".-> v2
v2 --"p:statement/P140"--> v3
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P1107".-> v4
bind0[/"?proportion * '100^^xsd:integer'"/]
v4 --o bind0
bind0 --as--o v5
end
end