query: SELECT ?item ?itemLabel ?daysInUN (SUM(?daysInOffice) AS ?filled) (FLOOR(?filled / ?daysInUN * 10000) / 100 AS ?knownPercent) WHERE {      
    # Current UN Member Statesc
    ?item wdt:P31 wd:Q3624078 ; p:P463 ?ms .
    ?ms ps:P463 wd:Q1065 ; pq:P580 ?joined .
    FILTER NOT EXISTS { ?ms pq:P582 [] } 
    BIND(FLOOR(NOW()-?joined) AS ?daysInUN)
  
    # what office(s) = head of government, and when?
    ?item p:P1313 ?os .
    ?os ps:P1313 ?office .
    OPTIONAL { ?os pq:P580 ?office580 }
    OPTIONAL { ?os pq:P582 ?office582 }
    FILTER ( !BOUND(?office582)