byshop94 > 03-10-17, 10:29 PM
ongke0711 > 03-10-17, 11:15 PM
TRANSFORM Avg(DIEM.DIEM) AS AvgOfDIEM
SELECT SV.MASV AS ID, SV.TENSV, Avg(DIEM.DIEM) AS ĐTB
FROM SV INNER JOIN (MONHOC INNER JOIN DIEM ON MONHOC.MAMONHOC = DIEM.MAMONHOC) ON SV.MASV = DIEM.MASV
GROUP BY SV.MASV, SV.TENSV
PIVOT MONHOC.TENMONHOC;