I have a table having a 'duration' column which stores the duration in time format i.e. the datatype is 'time' . When i calculate the average of this 'duration' column based on certain group by condition ,it gives me following output :
Following is the query :
select avg(Cactive_duration) as 'duration'
from table_name
group by column_name;
But when I try to convert them to time format following is the output:
Following is the query :
select time(avg(Cactive_duration)) as 'duration'
from table_name
group by column_name;
Any help is greatly appreciated. The database is MySQL.