Calculating number of people based on shift pattern, MS Access

Asked By 0 points N/A Posted on -
qa-featured

I want to calculate the number of people from certain province in a party. Now the problem comes because it has to go with the shift pattern. I tried to do it by myself, but things got a little messy.
Thanks for your help.

SHARE
Answered By 0 points N/A #116479

Calculating number of people based on shift pattern, MS Access

qa-featured

 

First we need to know the attributes of the table you are using. I assume you are using a table with the following attributes.
1. Name
2. Province
3. ID_number
4. etc….
Just you need to find the number of people of a province, then all you need to do is to write a very simple SQL query that is used to count the number of tuples based on a province. Use the below
Select count(*) from <table name>
where province=’<province name>’;
Here the count(*) counts and reports the number of rows / tuples that are found to be of the same province with the given province name.
If you need the province name to be extracted from a string, then use the function SUBSTR.
Thanks.
 

Login/Register to Answer

Related Questions