By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,391 Members | 2,168 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,391 IT Pros & Developers. It's quick & easy.

Keep a running count of entries in a field.

P: 1
I have a field in my database that keeps track of what hotel people are staying at and I need to keep a running total of how many people are staying at which hotel.

I swear this should be really easy but I just can't come up with anything that will work.

I am thinking a countif type of thing, like =sum(if(property = Bellagio,1,0))
Aug 25 '08 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 374
I have a field in my database that keeps track of what hotel people are staying at and I need to keep a running total of how many people are staying at which hotel.

I swear this should be really easy but I just can't come up with anything that will work.

I am thinking a countif type of thing, like =sum(if(property = Bellagio,1,0))
You can create a group Query that will do this without any problem.

You can use the following example:

Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT [FieldNameOfHotelNames], Count(*) as People FROM ListOfMembers GROUP BY [FieldNameOfHotelNames]
  3.  
  4.  
Hope that helps,

Joe P.
Sep 28 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.