query-27f7544efc7d4b2113926bd2622b8652

rq turtle/ttl

title: Query to retrieve the current active Minister (as of July 2024) (should be 15) SELECT DISTINCT ?minister ?ministerLabel ?officeholderLabel WHERE { ?minister wdt:P279 wd:Q83307. #subclass of minister ?minister wdt:P17 wd:Q766. #country Jamaica ?minister wdt:P361 wd:Q5015520. #part of Cabinet of Jamaica ?minister wdt:P1308 ?officeholder. #office holder MINUS { ?minister wdt:P576 [] } #dissolved or abolished MINUS { ?minister wdt:P1366 [] } #replaced by SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

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#>
#title: Query to retrieve the current active Minister (as of July 2024) (should be 15)
SELECT DISTINCT ?minister ?ministerLabel ?officeholderLabel WHERE {
  ?minister wdt:P279 wd:Q83307. #subclass of minister
  ?minister wdt:P17 wd:Q766. #country Jamaica
  ?minister wdt:P361 wd:Q5015520. #part of Cabinet of Jamaica
  ?minister wdt:P1308 ?officeholder. #office holder
  MINUS { ?minister wdt:P576 [] } #dissolved or abolished
  MINUS { ?minister wdt:P1366 [] } #replaced by
  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("?minister"):::projected v2("?officeholder") a1((" ")) a2((" ")) c2(["wd:Q83307"]):::iri c11(["bd:serviceParam"]):::iri c4(["wd:Q766"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal c6(["wd:Q5015520"]):::iri v1 --"wdt:P279"--> c2 v1 --"wdt:P17"--> c4 v1 --"wdt:P361"--> c6 v1 --"wdt:P1308"--> v2 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P576"--> a1 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P1366"--> a2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end