The selection list is invalid because the column is neither included in the aggregate function nor in the group by clause. To display this column
You can add
| Aggregate functions |
Description |
| AVG (Expr) |
The average value of the column value. This column can only contain numeric data. |
| Count (Expr), Count (*) |
Column value count (if the column name is specifiedExpr) Or the count of all rows in the table or group (if * is specified *). Count (Expr) Ignore null values, but count (*) contains null values in the count. |
| Max (Expr) |
The maximum value in the column (the last value in the alphabetic order of the text data type ). Ignore null values. |
| Min (Expr) |
The smallest value in the column (the first value in the alphabetic order of the text data type ). Ignore null values. |
| Sum (Expr) |
The total number of column values. This column can only contain numeric data. |