query: # constituency-mandates
  
  SELECT DISTINCT ?ordinal ?item ?start_date ?start_precision ?end_date ?end_precision ?party ?prev ?next ?term
  WHERE {
    ?item wdt:P31 wd:Q5 ; p:P39 ?posn .
    ?posn pq:P768 wd:Q584337 .
    FILTER NOT EXISTS { ?posn wikibase:rank wikibase:DeprecatedRank }
  
    OPTIONAL { ?posn pqv:P580 [ wikibase:timeValue ?start_date; wikibase:timePrecision ?start_precision ] }
    OPTIONAL { ?posn pqv:P582 [ wikibase:timeValue ?end_date; wikibase:timePrecision ?end_precision ] }
    OPTIONAL { ?posn pq:P1365 ?prev }
    OPTIONAL { ?posn pq:P1366 ?next }
    OPTIONAL { ?posn pq:P4100 ?party }
    OPTIONAL {
      ?posn pq:P2937 ?term .
      OPTIONAL { ?term p:P31/pq:P1545 ?ordinal }
    }
  }
  ORDER BY DESC(?start_date) ?item
  