fixed the problem that makes a wrong result when two columns are in GROUP BY section.