query: SELECT ?item ?party_group ?party ?district ?start ?electedin
    WHERE { 
      ?item p:P39 ?ps . 
      ?ps ps:P39 wd:Q106684477.
      OPTIONAL { ?ps pq:P580 ?start }
      OPTIONAL { ?ps pq:P582 ?end }
      OPTIONAL { ?ps pq:P4100 ?party_group }
      OPTIONAL { ?ps pq:P102 ?party }
      OPTIONAL { ?ps pq:P768 ?district }
      OPTIONAL { ?ps pq:P2715 ?electedin }
      FILTER(!BOUND(?end)