Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to make a Ranking

0 views
Skip to first unread message

juniorwoodchuck

unread,
Oct 15, 2005, 2:59:04 AM10/15/05
to
I have a database with the following structure:

name,question_id,answer_right

with a sample content like

John,75,1

or

Jim,24,0

Now I need a ranking beginning with the names that have the most
entries of '1' in the field answer_right. For example, if John has 50
entries of '1', Jim has 48 and Jay has 42, I should get a list like
this:

John,50
Jim,48
Jay,42

Can anyone help me out with the appropriate statement?

0 new messages