What is {member of sports team} of {Mahela Jayawardene} that is {end time} is {2010-0-0} ?
Which country did Mahela Jayawardene represent till 2010?
What team did Mahela Jayawardene play for until 2010?
SELECT ?j WHERE { resource:Mahela_Jayawardene property:member_of_sports_team ?c . FILTER ( CONTAINS ( YEAR ( ?k ) , '2010' ) ) . ?c property:member_of_sports_team ?j . ?c property:end_time ?k }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q2739165> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P54> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P582> <2010-0-0>
} 

SELECT ?obj WHERE { wd:Q2739165 p:P54 ?s . ?s ps:P54 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'2010')) }