Link to home
Start Free TrialLog in
Avatar of raju1
raju1

asked on

Count Field in SQL

Dear Experts,

I have a table( id, duration) and its data are as follows:

id          duration
=          =====
1           0
2           5
3           0
4           1
5           2
6           9

I want a result by SQL query with the following two fields:
Count(duration only 0)   Count(duration not 0)
==============   ==============
2                                 4

ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of raju1
raju1

ASKER

it doesn't show any result.

Error message:
"Function Sum does not exist;"