Among the male customers in Sacramento, what percentage bought Dominion root beer in 2013?
male customers refers to Gender = 'M'; Sacramento refers to City = 'Sacramento'; percentage = MULTIPLY(DIVIDE(SUM(BrandID WHERE BrandName = 'Dominion'), COUNT(BrandID) WHERE City = 'Sacramento'), 1.0); Dominion refers to BrandName = 'Dominion'; in 2013 refers to TransactionDate > = 2013-01-01 AND TransactionDate < 2014-01-01;
SELECT CAST(COUNT(CASE WHEN T4.BrandName = 'Dominion' THEN T1.CustomerID ELSE NULL END) AS REAL) * 100 / COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeer AS T3 ON T2.RootBeerID = T3.RootBeerID INNER JOIN rootbeerbrand AS T4 ON T3.BrandID = T4.BrandID WHERE T1.City = 'Sacramento' AND T1.Gender = 'M' AND T2.TransactionDate LIKE '2014%'