你好我想问一些事情
如何使用mysql QUERY添加ABCD之类的分数
SELECT dcm_peserta.nm1, COUNT(siswa.nis) as jml, ROUND(dcm_peserta.nm1 / COUNT(dcm_peserta.nis) * 100) as percent
/* add SELECT for scoring here */
FROM dcm_peserta, siswa
WHERE siswa.id_kelas = dcm_peserta.id_kelas AND dcm_peserta.id_kelas = '65'
GROUP BY dcm_peserta.nis
就像如果百分比 = 0得分 A,如果百分比 = 1 直到 20得分 B
任何想法?