Mysql
 sql >> Datenbank >  >> RDS >> Mysql

MySQL-GRUPPE nach Anzahl

SELECT FROM, TO, COUNT(*) AS howmany,
       SUM(Type = 'Call_In') AS Call_In, SUM(Type = 'Call_Out') AS Call_Out
FROM table
GROUP BY FROM, TO