I have created a query which sums up the interval for respective date-time,
select sum(ts_polling) / count(ts_polling) as Average_Queue_Wait_Time , cast(time_start AS Date)
from callcent_queuecalls group by cast(time_start AS date) order by time_start DESC;
Is there a way to convert Average_Queue_Wait_Time from interval data type to number ?

SELECT EXTRACT(second FROM (select sum(ts_polling) / count(ts_polling) from callcent_queuecalls group by cast(time_start AS date) )) AS Queue_Wait_Time, cast(time_start AS DATE) AS DayOfMonth from callcent_queuecalls group by cast(time_start AS Date) order by cast(time_start AS DATE) DESC---------- the following error was returned, ********** Error ********** ERROR: more than one row returned by a subquery used as an expression SQL state: 2100