Count in Query

  • Thread starter Thread starter Kris
  • Start date Start date
K

Kris

How can I write a query that will count the following
three fields?

Thanks,
Kris

Field: 133
Table: 2004_April
Total: Count
Criteria: >.05

Field: 134
Table: 2004_April
Total: Count
Criteria: >.08

Field: 135
Table: 2004_April
Total: Count
Criteria: >.05
 
Try something along the lines of

SELECT SUM(IIf([133] > 0.05,1,0))AS count133, SUM(IIf([134]
0.08,1,0))AS count134, SUM(IIf([135] > 0.05,1,0))AS count135
FROM 2004_April

Hope This Helps
Gerald Stanley MCSD
 
Back
Top