Wikidata:WikiProject Heads of state and government/Longest Heads of Government

From Wikidata
Jump to navigation Jump to search

Which current national Heads of Government have been in office for the longest time?

(Compare also those in office for the shortest time.)

This list is periodically updated by a bot. Manual changes to the list will be removed on the next update!

WDQS | PetScan | YASGUI | TABernacle | Find images Recent changes | Query: SELECT DISTINCT ?item ?country ?years WHERE { ?country wdt:P31 wd:Q6256 . ?office wdt:P279* wd:Q2285706 ; wdt:P1001 ?country FILTER NOT EXISTS { ?office wdt:P576 ?end_date } . ?posn ps:P39 ?office ; pq:P580 ?start_date . FILTER NOT EXISTS { ?posn pq:P582 ?end_date } ?item p:P39 ?posn ; wdt:P31 wd:Q5 . BIND(ROUND((NOW() - ?start_date)/365.2425) AS ?years) SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } } ORDER BY ?start_date LIMIT 20
image Article ?country ?years
Práxedes Mateo Sagasta. Pintado por Casado del Alisal en 1884.jpg
Práxedes Mateo Sagasta Spain 133
Hassanal Bolkiah.jpg
Hassanal Bolkiah Brunei 51
Khalifa ibn Salman Al Khalifa.jpg
Khalifa bin Salman Al Khalifa Bahrain 49
Yoweri Museveni September 2015.jpg
Yoweri Kaguta Museveni Uganda 33
Isaias Afwerki in 2002.jpg
Isaias Afwerki Eritrea 28
Tuilaepa Sailele Malielegaoi.jpg
Tuilaepa Aiono Sailele Malielegaoi Samoa 20
Hun Sen.jpg
Hun Sen Cambodia 20
Ralph Gonsalves (cropped).jpg
Ralph Gonsalves Saint Vincent and the Grenadines 18
Artur Rasizadə (2009).jpg
Artur Rasizade Azerbaijan 15
RooseveltSkerrit.jpg
Roosevelt Skerrit Dominica 15
Lee Hsien-Loong - World Economic Forum Annual Meeting 2012 cropped.jpg
Lee Hsien Loong Singapore 14
Pierre Nkurunziza - World Economic Forum on Africa 2008.jpg
Pierre Nkurunziza Burundi 13
Angela Merkel. Tallinn Digital Summit.jpg
Angela Merkel Germany 13
Evo Morales 2017.jpg
Evo Morales Bolivia 13
Sheik Mohammed bin Rashid Al Maktoum.jpg
Mohammed bin Rashid Al Maktoum United Arab Emirates 13
Frank Bainimarama September 2014.jpg
Frank Bainimarama Fiji 12
Daniel Ortega (cropped).jpg
Daniel Ortega Nicaragua 12
Gurbanguly.jpg
Gurbanguly Berdimuhamedow Turkmenistan 12
Ernest Bai Koroma.jpg
Ernest Bai Koroma Sierra Leone 11
Belizean Prime Minister, Dean Barrow in London, 27 June 2013 (cropped).jpg
Dean Barrow Belize 11
End of automatically generated list.

The underlying query that generates this report is:

SELECT DISTINCT ?country ?countryLabel ?person ?personLabel ?years
WHERE {      
  ?country wdt:P31 wd:Q6256 . 
  ?office wdt:P279* wd:Q2285706 ;  
          wdt:P1001 ?country
  FILTER NOT EXISTS { ?office wdt:P576 ?end_date } .
  ?posn ps:P39 ?office ; pq:P580 ?start_date .
  FILTER NOT EXISTS { ?posn pq:P582 ?end_date }
  ?person p:P39 ?posn ; wdt:P31 wd:Q5 .
  BIND(ROUND((NOW() - ?start_date)/365.2425) AS ?years)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}
ORDER BY ?start_date
LIMIT 20

Try it!