Aggregate Functions

I am assessing RT for a client. One of his requirements is to run query
and work out how much time has been spent on each queue, later on he
will need to break this down by queue by month.

I can’t see how to run aggregate SQL functions in the query forms - can
someone point me in the right direction?

Thanks

Kevin.