Wednesday, February 8, 2017

crosstab

select kodejurusan, sum(if(kelamin='L',1,0)) as laki, sum(if(kelamin='P',1,0)) as perempuan
from mahasiswa
group by kodejurusan