I am trying to use COALESCE on two aggregrate functions. One being a AVG and the other a COUNT. When nothing is returned I want to display either text or say 0. Am I using the wrong thing here? This is my code:
COALESCE((date_trunc('minute',AVG(AGE(t.close_date,t.creation_date))))::varchar),'None ') AS TimeFrame,
COALESCE((COUNT(t.task_id)::varchar),0)
Any suggestions??
Thanks
COALESCE((date_trunc('minute',AVG(AGE(t.close_date,t.creation_date))))::varchar),'None ') AS TimeFrame,
COALESCE((COUNT(t.task_id)::varchar),0)
Any suggestions??
Thanks