473,668 Members | 2,350 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 1700
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
10666
by: randy.p.ho | last post by:
Using JDBC, is there a way to call a stored procedure with multiple return values? Thanks.
4
8086
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 CHIP ----------- ---------- 1 Lays 1 Ruffles 1 Ruffles
7
3767
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 extended. So if it's already 128 in size it needs to be realloc'd to (ORIGSIZE + NEWSIZE) right ? I have provided a small example below, maybe that will make my describtion somewhat clearer... Thank you for any suggestions..
11
2546
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 for a single row from source table (tableA). There is a one to many relationship from source to target table (because of the ON condition). We also know upfront that thsi merge will result in all update and no inserts. The source table is tableA...
1
2239
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 the number of days and the counts. I have created the corresponding report to show the sum and verages. But I don't know how to make them print on a main report that will display the information of multiple status since I have to enter multiple...
35
9345
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 500000 to 3200000 of a file whose size is say 20MB... how do i request a download which starts directly at 500000th byte... thank u cheers
18
5795
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 either? 1) run through the string and test using in_array('a', 'b', 'c') 2) run through array and test using strpos( $items.... Where I find #2 the best.
9
20322
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 counts for each individual month. Any help would be appreciated.
3
3633
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 lineitems with the same number it was adding all of the items with the same ....obviously. So i tried to just find records with multiple criteria..... part number (formatted as text) and the (formatted as number). Nz(DSum("shipqty",...
0
8459
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8653
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7398
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2018
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1783
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.