473,322 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Keep a running count of entries in a field.

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
1 1886
PianoMan64
374 Expert 256MB
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

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

Similar topics

1
by: Joseph Santaniello | last post by:
Hello all, I have a table with among other things a timestamp field. To get the count of records per hour I do: select count(*) as c, date_trunc('hour', timestmp) as h from mytable
6
by: M.Kamermans | last post by:
I have an XSLT script that has to operate on some particularly nasty XML to turn it into a SQL databse, but 'entries' in the XML aren't actually unique, so their unique identifier is useless. I...
5
by: fwells11 | last post by:
Hi there. As you will see from my questions, I am an SQL newb. I dabble but never get to spend enough time to get proficient so base any feeedback on that basis please. This is all theoretical...
3
by: C. Homey | last post by:
I have an Access 2000 database (42,000+ records) for which I need a count of records by state (AL=320, AK=92, NY=1,932, etc). Obviously, I don't want to (and probably can't...) do the count...
17
by: keith | last post by:
I am trying to get a exact count of different distinct entries in an Access column. At first, I was trying to work with three columns, but I've narrowed it down to one to simplify it. I've searched...
9
by: Terry E Dow | last post by:
Howdy, I am having trouble with the objectCategory=group member.Count attribute. I get one of three counts, a number between 1-999, no member (does not contain member property), or 0. Using...
15
by: l3vi | last post by:
I have a new system Im building that stores entries of what people are searching for on my sites. I want to be able to keep records of how many times a keyword was searched for daily, and from...
1
by: michael.martinek | last post by:
Greetings! I've recently been trying to do something, which apparently looks like it may be a little odd.. I'm not finding anything in the manuals or anywhere on the web where something similiar...
12
by: petter | last post by:
Hi! I have two questions: one question that regards the COUNT-function, and one about how to display a month even if I don’t have any data for that month. I have an Access database where I want...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.