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

Come ottenere i valori saggi della categoria relativi all'utente?

select `User Name`,
    sum(case when Status = 'Open' then 1 end) as Open,
    sum(case when Status = 'Assigned' then 1 end) as Assigned,
    sum(case when Status = 'Closed' then 1 end) as Closed
from Status
group by `User Name`