luonguct > 17-12-16, 02:18 PM
cpucloi > 17-12-16, 05:07 PM
ongke0711 > 17-12-16, 07:21 PM
S_ELECT tblCaodo.ID, tblCaodo.Caodo,
(S_ELECT TOP 2 Avg([B.Caodo]) AS A FROM tblCaoDo AS B
WHERE (B.ID<=tblCaoDo.ID) AND (B.ID >=tblCaoDo.ID-1)) AS TrungBinh2,
(S_ELECT TOP 3 Avg([B.Caodo]) AS A FROM tblCaoDo AS B
WHERE (B.ID<=tblCaoDo.ID) AND (B.ID >=tblCaoDo.ID-2)) AS TrungBinh3,
(S_ELECT TOP 4 Avg([B.Caodo]) AS A FROM tblCaoDo AS B
WHERE (B.ID<=tblCaoDo.ID) AND (B.ID >=tblCaoDo.ID-3)) AS TrungBinh4
FROM tblCaodo;