1. Registered User
Join Date
Sep 2010
Posts
1

how to do this?

there's this table that i was able to convert from numbers to sensible information. the first column includes the id number, the second column is for the city in the united states, and the third column is for the nationalities (and some have info like 'not reported'.)

all i need to do is use the code but how?

how to adapt the fragment of code below to show:
a) Two columns - the Filipino Population and the Total Population
b) The Filipino Population as a percentage of the total population

SELECT DISTINCTROW POPDATA.CITYNUM,
COUNT (*) FROM POPDATA
WHERE POPDATA.ANCNUMBER=720
GROUP BY POPDATA. CITYNUM
ORDER BY COUNT (*) DESC;

2. Registered User
Join Date
Sep 2010
Posts
2

## Help for MS Access homework: creating a sorted list

For our homework in our Computer science class, we were tasked to research by asking expert advice on database forums. We were first asked to download Census data to be analyzed using Microsoft Access. The data contained facts about 1% all people living in large US Cities at the time on the last US Census in the year 2000. The file gave the name of the city and the racial/ethnic ancestry of the person concerned.

I was able to achieve the objectives of the first task by illustrating the ff terms: fields, records, key fields, primary keys, foreign keys, relationship, and SQL.

To finish the task, we need to create a sorted list showing the number of Filipinos living in each city (with the cities with the largest number of Filipinos at the top).

I am not sure how to do this exactly. I need your advice on how to adapt the fragment of code below to show:

a) Two columns - the Filipino Population and the Total Population
b) The Filipino Population as a percentage of the total population

The code is:

SELECT DISTINCTROW POPDATA.CITYNUM
COUNT (*) FROM POPDATA
WHERE POPDATA.ANCNUMBER=720
GROUP BY POPDATA.CITYNUM
ORDER BY COUNT (*) DESC;

Thank you so much! I would really appreciate your advice on this.

3. Purveyor of Discontent
Join Date
Mar 2003
Location
The Bottom of The Barrel
Posts
6,102
Since you're both posting the same question, for your first posts, after joining on the same day, using oddly identical verbiage in certain areas of your posts... I decided to merge the two.

Perhaps you can get together and solve it as a team.

4. Registered User
Join Date
Sep 2010
Posts
2
That's because we are probably under the same teacher, although we both still need help.

I am really clueless with this task.

5. Moderator
Join Date
Jun 2005
Location
Richmond, Virginia USA
Posts
2,764

Linq ;0)>

6. Resident Curmudgeon
Join Date
Feb 2004
Location
In front of the computer
Posts
15,579