sql - Postgresql Multiple counts for one table - Stack Overflow
▻http://stackoverflow.com/questions/17076452/postgresql-multiple-counts-for-one-table
La même avec MariaDB (ou MySQL) :
SELECT type, SUM((place = ’home’)), SUM((place = ’school’)), … FROM reports GROUP BY type
Comme indiqué ici : ▻http://stackoverflow.com/a/17086564, c’est parce que true casté en int vaut 1 (et false vaut 0)(Permalink)