-- SELECT TIMESTAMPDIFF(YEAR, tgl_lahir, CURDATE()) AS age FROM m_penduduk
SELECT
	 Pasien Balita (0-5 tahun) Laki-Laki  as rentang_usia, CONCAT(COUNT(*),  pasien ) AS jumlah 
FROM
	( SELECT TIMESTAMPDIFF( YEAR, tgl_lahir, CURDATE()) AS usia, jenis_kelamin FROM m_penduduk ) a 
WHERE
	jenis_kelamin =  Laki-Laki  
	AND usia < 6 UNION
SELECT
	 Pasien Balita (0-5 tahun) Perempuan  as rentang_usia, CONCAT(COUNT(*),  pasien ) AS jumlah 
FROM
	( SELECT TIMESTAMPDIFF( YEAR, tgl_lahir, CURDATE()) AS usia, jenis_kelamin FROM m_penduduk ) a 
WHERE
	jenis_kelamin =  Perempuan  
	AND usia < 6 UNION
	SELECT
	 Pasien Anak-anak (6-13 tahun) Laki-Laki  as rentang_usia, CONCAT(COUNT(*),  pasien ) AS jumlah 
FROM
	( SELECT TIMESTAMPDIFF( YEAR, tgl_lahir, CURDATE()) AS usia, jenis_kelamin FROM m_penduduk ) a 
WHERE
	jenis_kelamin =  Laki-Laki  
	AND usia >= 6 AND usia < 14 UNION
SELECT
	 Pasien Anak-anak (6-13 tahun) Perempuan  as rentang_usia, CONCAT(COUNT(*),  pasien ) AS jumlah 
FROM
	( SELECT TIMESTAMPDIFF( YEAR, tgl_lahir, CURDATE()) AS usia, jenis_kelamin FROM m_penduduk ) a 
WHERE
	jenis_kelamin =  Perempuan  
	AND usia >= 6 AND usia < 14 