473,508 Members | 4,753 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple counts

16 New Member
Hi,

How can you count x and y as seperate counts from the same field?

i.e. A table has the field Gender and I want to have one count which counts the number of records with 'male' as the gender' and another count which counts 'female' as the gender?

Any help will be very much appreciated
Feb 6 '09 #1
3 1688
ChipR
1,287 Recognized Expert Top Contributor
Make a query and set it to Totals. Add the Gender field and set Total: Group By, then add the Gender field again and set Total: Count.
Feb 6 '09 #2
DonRayner
489 Recognized Expert Contributor
Or you can use the DSum() Function

Expand|Select|Wrap|Line Numbers
  1. DSum("[Gender]","YourTable", "[Gender] = 'y'")
Replace YourTable with whatever your table name is.
Feb 6 '09 #3
Wildster
16 New Member
Thanks guys, big help
Feb 9 '09 #4

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

Similar topics

4
10633
by: randy.p.ho | last post by:
Using JDBC, is there a way to call a stored procedure with multiple return values? Thanks.
4
8079
by: Jim | last post by:
I'm having trouble doing multiple counts with groups, ordering, and joins. Can someone help me out? Below is two table samples and what I'm trying to get my output to be: TABLEA ID ...
7
3755
by: Mischa | last post by:
Hello, I am trying to use realloc multiple times to extend an array of doubles but unfortunatly it keeps failing. I think I am mixing up the size to which the old memory block needs to be...
11
2527
by: UDBDBA | last post by:
Hi: This is a merge questions which has been posted and answered... in my case need more clairification when target table (tableB) matched multiple rows to be updated based on the ON condition...
1
2228
by: josecruz | last post by:
I have to create a summary report that will provide counts and # average of days for multiple "Status" by entering different dates for every criteria. I have created several queries that calculates...
35
9298
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from...
18
5765
by: jodleren | last post by:
Hi! I was reading php.net for a way to find a number of characters in a strings. Say I want to look for a b and c ind $string. As far as I could see, there is no function for that. So, I can...
9
20307
by: ncyankeefan | last post by:
I am trying to get the number of specific alerts for each month of the year. I would like to get these counts in one query or subquery. There is a date field in table so I can specifically get the...
3
3621
by: kstevens | last post by:
Please help. I know the sysntax is wrong. Here are some details. I am looking for the sum of past shipped items. I originally wrote this Dsum with only one criteria, but because of multiple...
0
7332
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7058
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5635
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
426
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.