query-9f7fe907320eda8870057757fc4011cf

rq turtle/ttl

Memberships of National Parliaments without qualifiers statements have no qualifiers. (P39)position held I'm trying to investigate what percentage of the existing "member of a national parliament" My approach to finding the total number of such memberships is currently:

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT (COUNT(DISTINCT ?position_statement) AS ?count)
WHERE {  
  ?person p:P39 ?position_statement . # an item has a position
  ?position_statement ps:P39 ?mem .
  ?person wdt:P31 wd:Q5 .             #  (and that item is a human)
  ?mem wdt:P279 wd:Q486839 .          # as some subclass of Member of Parliament
  ?mem wdt:P1001 ?jurisdiction .      # with a jurisdiction
  ?jurisdiction wdt:P31 wd:Q6256 .    # where the jurisdiction is a country (i.e. National Legislature)
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?count") v4("?jurisdiction") v3("?mem") v1("?person") v2("?position_statement"):::projected c4(["wd:Q5"]):::iri c6(["wd:Q486839"]):::iri c8(["wd:Q6256"]):::iri v1 --"p:P39"--> v2 v2 --"p:statement/P39"--> v3 v1 --"p:direct/P31"--> c4 v3 --"p:direct/P279"--> c6 v3 --"p:direct/P1001"--> v4 v4 --"p:direct/P31"--> c8 bind1[/"count(?position_statement)"/] v2 --o bind1 bind1 --as--o v5