Help for MS Access homework

  • 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.

  • We're not going to do your homework for you. Advice, sure, but not a complete solution.

    First things first... Does Access have a CASE or SWITCH type statement? I'm pretty sure it does, but can't remember the details.

    If so, can you write a query that returns a list of all people and has a column whose value is 1 if the person is Filipinos, 0 if they are not?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Would you mind telling us where you're located at?

    It seems like a phenomenon...

    I've seen this very same question (including exactly the same query even down to POPDATA.ANCNUMBER=720) at least a dozen times so far.

    If it's about learning how to ask for assistance in an online forum you could simply copy and print the article first referenced in my signature. It'll tell you a lot about asking for help.

    E.g. provide table def and sample data in a ready to use format, what is your expected result based on the sample data provided, what have you tried so far and where did you get stuck.

    Therewith you'll learn the difference between asking for advice vs. asking someone to do the job you're supposed to do.

    In one of the replies I mentioned that I'd like to contact the person asking you to look for online help for his/her motivation.

    Edit: Sorry Wayne and Lowell...

    @WayneS Lowell (if you're lurking around): And here's the next one... 😉



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • LutzM (9/8/2010)


    I've seen this very same question (including exactly the same query even down to POPDATA.ANCNUMBER=720) at least a dozen times so far.

    Links?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (9/8/2010)


    LutzM (9/8/2010)


    I've seen this very same question (including exactly the same query even down to POPDATA.ANCNUMBER=720) at least a dozen times so far.

    Links?

    As requested:

    SSC1,

    SSC2,

    Several links at phpfreaks.com, go4expert.com, and itknowledgeexchange.techtarget.com

    Edit: add dbforums.com, utteraccess.com,access-programmers.co.uk, accessforums.net, list goes on...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply