title: MySQL Group By two fields but count for two different groups?
body: <p>So let's say I have a big query that is grouping by column1 and column2 and performing a count. In the same query, how can I have a count grouped by column1? It could be a subquery but the prior group by is causing the problem. I've tried case and if statements but nothing seems to be working. The hard part is trying to get these two counts in the same query. Thanks in advance.</p>