Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help for MS Access homework

Author  Topic 

tantantantan
Starting Member

1 Post

Posted - 2010-09-08 : 11:20:36
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.

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2010-09-08 : 11:47:18
quote:
Originally posted by tantantantan

<snip> we were tasked to research by asking expert advice on database forums.<snip>
Classic

This is an MS SQL specific forum. You might have better luck by posting in an MS Access forum.
Go to Top of Page
   

- Advertisement -