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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Couting several columns with parameter 1
Access Dcount (multiple criteria) 3
Count <>0 not working 3
Using "Count" in Queries 1
Countif on qry 6
Count text values in a Access Field 0
counting Null fields 3
Totals Query 2

Back
Top