summing duration is simple, not sure what a sum of call_time would be,
did you want the count?
select sum(datediff(ss,'00:00:00',call_duration) as totduration_secs
FROM [Microcall_Analysis].[dbo].[tbl_CallData]
where extension = '6355'
and call_date between '08/20/07' and '09/20/07'
-- bruce (sqlwork.com)
select
KevinB wrote:
> That query I included returns 1327 results, the call_duration is just one
> column. The actual query is in a stored procedure and would look like this.
> I need to sum call_duration and call_time but I'm not sure how to get those
> totals. Thanks again.
>
> SELECT [id]
> ,[pattern]
> ,[call_date]
> ,[call_time]
> ,[call_duration]
> ,[extension]
> ,[trunk]
> ,[dialed_number]
> ,[place_called]
> ,[cost]
> ,[caller_name]
> FROM [Microcall_Analysis].[dbo].[tbl_CallData]
> where extension = '6355'
> and call_date between '08/20/07' and '09/20/07'
>
>
>
|