Jump to content

SQL Query Question

- - - - -

  • Please log in to reply
1 reply to this topic

#1
chescaaa

chescaaa

    Newbie

  • Members
  • Pip
  • 1 posts
Hi everyone,

So I'm doing this exercise for basic computer science class. Using Microsoft Access, we were asked to create an SQL query that would tally the number of Filipinos from a certain database and display the amount as a percentage of the total population, arranged by city and in descending order.

How will I go about this? Thank you! :)

#2
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
So you'd probably want to do an initial query with no parameters, count those for a final count.

Do another one where you just select one demographic (Filipinos) and order them by city in descending order.

Do a bit of math with the two to figure out percentage.

SQL ORDER BY Keyword

SQL: COUNT Function

http://forum.codecal...-functions.html




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users