DISTINCT
SQL-L021Ambiguous use of DISTINCT
in select statement with GROUP BY
.
DISTINCT
and GROUP BY
are conflicting.
SELECT DISTINCT
a
FROM foo
GROUP BY a
Remove DISTINCT
or GROUP BY
. In this case, removing GROUP BY
is better.
SELECT DISTINCT
a
FROM foo