• Kepala Sekolah
    Memberi Sepanjang Hayat
Maaf, Terdapat Kesalahan 1 sELECT nama,gambar,moto,jalan,alamat_website,facebook,twitter, email, GROUP_CONCAT(if(jenis = 'psb', jumlah, NULL)) AS 'jumlah_psb', GROUP_CONCAT(if(jenis = 'blog', jumlah, NULL)) AS 'jumlah_blog' FROM ( SELECT st_master_pengajar.*, count(blog.id) as jumlah, 'blog' as jenis FROM st_master_pengajar left join blog on blog.kode_referensi_master_identitas=st_master_pengajar.kode_otomatis GROUP BY st_master_pengajar.kode_otomatis union ALL SELECT st_master_pengajar.*, count(berita.id) as jumlah,'psb' as jenis FROM st_master_pengajar left join berita on berita.kode_referensi_pemakai=st_master_pengajar.kode_otomatis GROUP BY st_master_pengajar.kode_otomatis) att GROUP BY kode_otomatis ORDER BY jumlah_psb DESC,jumlah_blog DESC