query: SELECT ?item ?party ?district ?start ?end 
  WHERE { 
    ?item p:P39 ?statement . 
    ?statement ps:P39 wd:Q18002923 ; pq:P2937 wd:Q28404538 . 
    OPTIONAL { ?statement pq:P580 ?start } 
    OPTIONAL { ?statement pq:P582 ?end } 
    OPTIONAL { ?statement pq:P768 ?district } 
    OPTIONAL { ?statement pq:P1268 ?party } 
  }