what is the {end time} for {Auckland} has {head of government} as {Len Brown} ?
What was the year that Len Brown left as mayor of Auckland?
When was Len Brown's last year as the mayor of Auckland?
SELECT ?n WHERE { ?n property:head_of_government resource:Len_Brown . ?n property:end_time ?n . resource:Auckland property:head_of_government ?n }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q37100> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P6> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q4116955> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q37100 p:P6 ?s . ?s ps:P6 wd:Q4116955 . ?s pq:P582 ?value}