what number of fermentation bases have the same spirit products as potato?
Value
3
class class entity
distilled_spirits.fermentation_base distilled_spirits.distilled_spirit_type m.05vtc
distilled_spirits.fermentation_base distilled_spirits.distilled_spirit_type distilled_spirits.fermentation_base
Fermentation base Distilled spirit type Potato
count none none
distilled_spirits.fermentation_base.spirit_products distilled_spirits.fermentation_base.spirit_products
Spirit products Spirit products
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 (COUNT(?x0) AS ?value) WHERE {
SELECT DISTINCT ?x0  WHERE { 
?x0 :type.object.type :distilled_spirits.fermentation_base . 
?x1 :type.object.type :distilled_spirits.distilled_spirit_type . 
VALUES ?x2 { :m.05vtc } 
?x0 :distilled_spirits.fermentation_base.spirit_products ?x1 . 
?x2 :distilled_spirits.fermentation_base.spirit_products ?x1 . 
FILTER ( ?x0 != ?x1 && ?x0 != ?x2 && ?x1 != ?x2  )
}
}
(COUNT (AND distilled_spirits.fermentation_base (JOIN distilled_spirits.fermentation_base.spirit_products (JOIN (R distilled_spirits.fermentation_base.spirit_products) m.05vtc))))