query-2618836784ec9aa6bb1204117b9580ca
National Paralympic/Olympic Committee Databases
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?database ?databaseLabel ?dbCountry ?dbCountryLabel ?dbQID ?dbQIDLabel ?statedIn ?statedInLabel WHERE {
?database wdt:P31 wd:Q30225604. #all NOC database properties
?database wdt:P17 ?dbCountry. #get country
OPTIONAL{
?dbQID wdt:P1687 ?database. #get QIDs that use properties from line 2
?dbQID wdt:P31/wdt:P279* wd:Q7094076. #filter down to online databases and subclasses (removes a lot of wiki templates)
}
OPTIONAL{ ?database wdt:P9073 ?statedIn. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?database"):::projected
v2("?dbCountry"):::projected
v3("?dbQID"):::projected
v4("?statedIn"):::projected
a1((" "))
c6(["wd:Q7094076"]):::iri
c9(["bd:serviceParam"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q30225604"]):::iri
v1 --"wdt:P31"--> c2
v1 --"wdt:P17"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P1687".-> v1
v3 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P9073".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end