gamito
4/21/2015 - 10:57 PM

todas as t-shirts

todas as t-shirts

SELECT ppl_mode,
	COUNT(IF(ppl_shirt='S',1,NULL)) AS S,
	COUNT(IF(ppl_shirt='M',1,NULL)) AS M,
	COUNT(IF(ppl_shirt='L',1,NULL)) AS L,
	COUNT(IF(ppl_shirt='XL',1,NULL)) AS XL,
	COUNT(IF(ppl_shirt='XXL',1,NULL)) AS XXL,
	COUNT(*) as totais
	FROM tvp_2016
	where ppl_number IS NOT NULL
	GROUP BY ppl_mode WITH ROLLUP