Hello EXPERTS! What am I doing wrong on this query? I would like to be able to compute the counts column for AVG, MIN, MAX and SUM.
SELECT DATEADD(mi, -15, dtcompleted) as Timeframe, count(1) as counts
from sds (nolock)
where dtcompleted between '2006-06-26' and '2006-06-27'
group by dtcompleted
order by dtcompleted, 1
compute AVG(counts), SUM(counts), MAX(counts), MIN(counts)