Question: Which justice of the Supreme Court in 2011 ended a judicial tenure before August 7, 2009?
Answer(s):
answer: Ruth Bader Ginsburg

SPARQL query:
PREFIX ns: <http://rdf.freebase.com/ns/>
SELECT DISTINCT ?x
WHERE {
FILTER (?x != ns:m.07sz1)
FILTER (!isLiteral(?x) OR lang(?x) = '' OR langMatches(lang(?x), 'en'))
ns:m.07sz1 ns:law.court.judges ?y .
?y ns:law.judicial_tenure.judge ?x .
FILTER(NOT EXISTS {?y ns:law.judicial_tenure.from_date ?sk0} || 
EXISTS {?y ns:law.judicial_tenure.from_date ?sk1 . 
FILTER(xsd:datetime(?sk1) <= "2011-12-31"^^xsd:dateTime) })
FILTER(NOT EXISTS {?y ns:law.judicial_tenure.to_date ?sk2} || 
EXISTS {?y ns:law.judicial_tenure.to_date ?sk3 . 
FILTER(xsd:datetime(?sk3) >= "2011-01-01"^^xsd:dateTime) })
?x ns:law.judge.courts ?c .
?c ns:law.judicial_tenure.to_date ?num .
FILTER (?num < "2009-08-07"^^xsd:dateTime) . 
}