inverness caledonian thistle was a team involved in which football match?
Entity
m.010f2jfb
2014 Celtic F.C. vs Inverness football match
class entity
soccer.football_match m.037mjv
soccer.football_match soccer.football_team
Football Match inverness caledonian thistle
none none
soccer.football_match.teams
Teams
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX : <http://rdf.freebase.com/ns/> 
SELECT (?x0 AS ?value) WHERE {
SELECT DISTINCT ?x0  WHERE { 
?x0 :type.object.type :soccer.football_match . 
VALUES ?x1 { :m.037mjv } 
?x0 :soccer.football_match.teams ?x1 . 
FILTER ( ?x0 != ?x1  )
}
}
(AND soccer.football_match (JOIN soccer.football_match.teams m.037mjv))