Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I have a column Status having data like
'Answered'
'Non Answered'
'Busy'

i need out put like this

count(Answered+Nonanswered+Busy) / (count(Answered+NonAnswered))
.Can any one help on this.
Posted
Comments
RossMW 19-Jun-15 2:51am    
Have you researched Google for the group by function?
Arkadeep De 19-Jun-15 3:04am    
Either try this
(count(Answered)+count(Nonanswered)+count(Busy)) / (count(Answered)+count(NonAnswered))
or use group by clause...

1 solution

Try

SQL
Select (count(answered) + count(nonanswered) + count(busy))/ (count(answered)+ count(nonanswered)) as ans from table group by status
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900