filmov
tv
mysql - Count different values - Stack Overflow

Показать описание
SELECT region, count(distinct politicalViews),
sum(politicalViews='liberal'), sum(politicalViews='conservative')
FROM table GROUP BY region;
Why don't you want to know how many communists are there?
#region #select #don't #many #communists
sum(politicalViews='liberal'), sum(politicalViews='conservative')
FROM table GROUP BY region;
Why don't you want to know how many communists are there?
#region #select #don't #many #communists