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,
Red Flag Submitted
Thank you for helping keep Tek-Tips Forums free from inappropriate posts. The Tek-Tips staff will check this out and take appropriate action.
Reply To This Thread
Posting in the Tek-Tips forums is a member-only feature.