query-1cd3e22060208384a7f50e766d231a3c

rq turtle/ttl

Propertiesinstance of (P31)country (P17)

Use at

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 DISTINCT ?committee ?committeeLabel ?country ?countryLabel ?statements
WHERE {
  { ?committee wdt:P31 wd:Q362104 . }
  UNION
  { ?committee wdt:P31 wd:Q59057226 . }
  OPTIONAL { ?committee wdt:P17 ?country . }
  ?committee wikibase:statements ?statements .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?committee ?committeeLabel ?country ?countryLabel ?statements
ORDER BY DESC(?statements)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?committee"):::projected v3("?country"):::projected v1("?statements"):::projected c7(["bd:serviceParam"]):::iri c2(["wd:Q362104"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c3(["wd:Q59057226"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c3 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c2 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P17".-> v3 end v2 --"wikibase:statements"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end