Mysql
 sql >> Base de données >  >> RDS >> Mysql

GROUPE MySQL Par nombre

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