Going by Basics..GROUP BY
operations are something executed ,after the JOIN
operations underneath(File IOs).. And then only the SELECTED
resultet would be available.
Now that, you specified something as Dummy
in SELECT
, and the database would not know it, Because While GROUP
ing it is not available at the TABLE level.!
Try your query using GROUP BY your_column, ' '
it would work.. Because you have mentioned it directly instead referring an alias!
Finally, when a GROUP by
is used.. You can specify any constants in SELECT or GROUP BY.. because they are afterall included in your SELECTed
result, without a TABLE operation involved. So the database excuses them.