Escolar Documentos
Profissional Documentos
Cultura Documentos
A.
* use StudiKasus
SELECT 0 sequ,NIP,NamaKar,TmptLahir,JK,Alamat,Kota,JmlAnak,''cnt,JmlAnak as sum
FROM TblKaryawan
UNION ALL
SELECT 1 sequ,''NIP,''NamaKar,''TmptLahir,''JK,''Alamat,Kota,
''JmlAnak,COUNT(NIP) AS cnt,SUM(JmlAnak) AS sum FROM TblKaryawan
GROUP BY Kota
ORDER BY Kota,sequ