September 2, 2010 at 6:35 am
Hey! I just want to know how I can adapt the following fragment of code:
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;
September 2, 2010 at 7:05 am
crap someone else asked this exact same question a while ago and i answered it;
is this a homework question?
http://www.sqlservercentral.com/Forums/Topic968341-131-1.aspx
Lowell
September 2, 2010 at 10:21 am
Since I don't support cheating I decided to remove my solution from the thread Lowell mentioned. I'm sorry for all those who might have found it useful in a more ethical way.
@abe.nito
You're not the first one asking this question and this is not the only forum the question has been asked. At least, some of those folks were honest enough to say it is for a computer science project...
If you would have been, we would have tried to guide you in the right direction. Probably even with some explanation why you should or shouldn't use one or the other method. You just missed that opportunity, I guess.
September 3, 2010 at 1:00 pm
Sorry about not indicating it was for a homework, guys! The homework is actually trying to get an expert advice on how to do it and trying to apply that expert advice. We weren't taught how to do anything related to it so I really have no idea how. It would be very much appreciated if you guys could still help me out. If not, it's alright! Thanks!
September 3, 2010 at 4:00 pm
abe.nito (9/3/2010)
Sorry about not indicating it was for a homework, guys! The homework is actually trying to get an expert advice on how to do it and trying to apply that expert advice. We weren't taught how to do anything related to it so I really have no idea how. It would be very much appreciated if you guys could still help me out. If not, it's alright! Thanks!
Are you serious? Your professor is telling you to get an expert advie and modify it???
If that's the case, I'd like to know the name of the university as well as the name of your professor so I can try to contact him and have a rather serious smalltalk about how (s)he supports cheating. I can't think of any valid reason to search for an "expert advice" without even trying to solve the puzzle. Weird....
September 3, 2010 at 4:42 pm
Ignore the query.
How do you get this answer if you have the populations?
Now, how do you get the populations in a query?
Apply the math to the query. It's not that hard.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply