find consumer products whose theme is dr.who.
Entity
m.09vwxld
The Journal of Impossible Things
class entity
business.consumer_product m.02906
business.consumer_product business.product_theme
Consumer product dr.who
none none
business.consumer_product.themes
Themes
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 :business.consumer_product . 
VALUES ?x1 { :m.02906 } 
?x0 :business.consumer_product.themes ?x1 . 
FILTER ( ?x0 != ?x1  )
}
}
(AND business.consumer_product (JOIN business.consumer_product.themes m.02906))