Skip to content
Advertisement

TeraData aggregate function

When I try to select couple of columns with count, I get the following error:

Selected non-aggregate values must be part of the associated group

My query is something like this.

Advertisement

Answer

If you’re after a count for each combination of COLUMN1 and COLUMN2:

If you’re after a count of all records in the table:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement