Table Structure:
Department of gender
BM1 male 1
BM2 male 1
BM1 female 2
BM2 female 4
BM1 male 5
Get the results with SQL:
Male and female
BM1 6 2 8
BM2 1 4 5