Question: Of the people that Demi Lovato was dating, which celebrity, had a romantic relationship that terminated the earliest?
Answer(s):
answer: Joe Jonas

SPARQL query:
PREFIX ns: <http://rdf.freebase.com/ns/>
SELECT DISTINCT ?x
WHERE {
FILTER (?x != ns:m.02wb6yq)
FILTER (!isLiteral(?x) OR lang(?x) = '' OR langMatches(lang(?x), 'en'))
ns:m.02wb6yq ns:base.popstra.celebrity.dated ?y .
?y ns:base.popstra.dated.participant ?x .
?x ns:celebrities.celebrity.sexual_relationships ?c .
?c ns:celebrities.romantic_relationship.end_date ?num .
}
ORDER BY ?num LIMIT 1