Question: In what year and at what event that ended earliest did the Miami Heat win the championship?
Answer(s):
answer: 2012 NBA Finals

SPARQL query:
PREFIX ns: <http://rdf.freebase.com/ns/>
SELECT DISTINCT ?x
WHERE {
FILTER (?x != ns:m.0jm2v)
FILTER (!isLiteral(?x) OR lang(?x) = '' OR langMatches(lang(?x), 'en'))
ns:m.0jm2v ns:sports.sports_team.championships ?x .
?x ns:time.event.end_date ?num .
}
ORDER BY ?num LIMIT 1