I have a table like the following and I have used GROUP_CONCAT(val) as LIST_Value
. I want to consider the mean of the this column and also the length of the values in each row. This AVG(GROUP_CONCAT(val))
and GROUP_CONCAT(AVG(val))
did not solve that.
CodePudding user response:
If you want the average, do it separately from the group concatenation.
SELECT point_id, date, GROUP_CONCAT(val) AS LIST_Value, AVG(val) AS AVG_Value
FROM yourTable
GROUP BY point_id, date