Mysql
 sql >> Database >  >> RDS >> Mysql

Come trasformare i risultati delle query sql in una tabella pivot usando gli array php?

select "month",
       SUM(case when department = 'Physics' and property = 'undergraduate' then total_no_students else 0 end) as "Physics-undergrad",
       [...]
from table_name
group by "month"