No of visitors who read this post: 601
Category: MS Access
Type: Question
No votes yet

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.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

# Comment Id: 57707

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.