Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

How can i get decimal values in of a column

$
0
0

I have this query where i am getting average of a time i want to get the value in decimal 

select Call_assign,
count([Call_assign]) as CallsReceived,(avg(datediff(ss, start_time,end_time))/60) as AvgMinutes,((avg(datediff(ss, start_time, end_time))/60)/count([Call_assign])) 
 as AveragePerRecord
from [Technical].[dbo].[Tech] where  
date_time between '2013-12-1' and '2013-12-25'   
group by Call_assign

Call_assignCallsReceived AvgMinutes AveragePerRecord
Jon                            25      174            6
Alex                            26          1431                   55
mark                           44          580                     13
Fatima                       32         320                     10

I want AvgMinutes and AveragePerRecord in full calculated for like 25 divide by 174 is 6.96 but its displaying only  6 how can i show it in decimal form 


New born in developing



Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>