query: SELECT ?item 
  WHERE 
  {
    ?item p:P39 ?statement .
    ?statement ps:P39 wd:Q10655178 ; pq:P580 ?start .
    OPTIONAL { ?statement pq:P2937 ?term }
    OPTIONAL { ?statement pq:P582  ?end }
    OPTIONAL { ?statement pq:P768  ?district }
    OPTIONAL { ?statement pq:P4100 ?group }
    BIND(COALESCE(?end, "3001-01-01T00:00:00Z"^^xsd:dateTime) as ?enddate)
    FILTER (?enddate > NOW())
  }