query: SELECT ?item ?party ?district ?election ?start ?end WHERE {
    ?item wdt:P31 wd:Q5; p:P39 ?statement .
    ?statement ps:P39 wd:Q9045502 ; pq:P2937 wd:Q69504535 .
    OPTIONAL { ?statement pq:P580 ?start }
    OPTIONAL { ?statement pq:P582 ?end }
    OPTIONAL { ?statement pq:P768 ?district }
    OPTIONAL { ?statement pq:P4100 ?party }
    OPTIONAL { ?statement pq:P2715 ?election }
  }