Results 1 to 2 of 2

Thread: help =\

  1. #1
    Join Date
    Nov 2004
    Posts
    4

    Unanswered: help =\

    i have a database already but i'm stuck on queries.

    the table in the database is called population

    the fields are:
    CityName
    Population
    RangeMaximumValue
    RangeMinimumValue
    RangeDescription
    TypeName

    and i have to:
    Calculate the total population for each city
    Calculate the average population for each city

    how do i do this, preferably in dsign view.

  2. #2
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    1)
    Select ta.cityName, SUM(ta.population)
    from tableA ta
    group by ta.cityName

    2)
    Select ta.cityName, AVG(ta.population)
    from tableA ta
    group by ta.cityName
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •