//Query warning erorSELECT TABHDBHCT.MAVACH_SP, TABHDBHCT.TENSP, SUM(TABHDBHCT.SOLUONG)*CASE WHEN [TRAHANG] = 0 THEN 1 ELSE -1 END AS SLFROM TABHDBHCT INNER JOIN TABHDBH ON TABHDBHCT.MASOPHIEU = TABHDBH.IDSOPHIEUWHERE (TABHDBH.TTTHANHTOAN = 1 OR TABHDBH.TTTHANHTOAN = 2) AND (TABHDBH.NGAY BETWEEN '11/01/2016' AND '11/30/2016')GROUP BY TABHDBHCT.MAVACH_SP, TABHDBHCT.TENSPORDER BY TABHDBHCT.TENSP;