GROUP BY clause is not giving the error on missing a column from the SELECT/ORDER BY/HAVING clause