Well, I just realized that my previous explination probably confused 
more than it explained, so here's my actuall query (with a bunch of 
extraneous stuff cout out):

SELECT
    hlstats_Awards.awardId,
    hlstats_Events_Frags.playerId,
    COUNT(hlstats_Events_Frags.weapon) AS awardcount
FROM
    hlstats_Events_Frags, hlstats_Awards
WHERE
    hlstats_Events_Frags.weapon = hlstats_Awards.code
GROUP BY
    hlstats_Awards.awardId,
    hlstats_Events_Frags.killerId
ORDER BY
    hlstats_Awards.awardId,
    awardcount DESC

Hope this clears it up a bit,

-Rufus
[EMAIL PROTECTED]
ICQ: 26037212
http://www.LionGames.com

Rufus wrote:

> My current query is really complicated, so I'll only deal with my 
> simplified output here.  I'm doing Half-Life stats program, and right 
> now I'm adding in awards to it.  This is a snip from my current output:
> +---------+----------+------------+
> | awardId | playerId | awardcount |
> +---------+----------+------------+
> |       7 |        4 |          1 |
> |       8 |        1 |          2 |
> |       8 |       44 |          2 |
> |       9 |        2 |          5 |
> |       9 |        4 |          5 |
> |       9 |        5 |          2 |
> |       9 |       25 |          2 |
> |       9 |        1 |          1 |
> |      10 |        4 |          7 |
> |      10 |        5 |          3 |
> |      11 |        4 |          6 |
> |      11 |        1 |          2 |
> |      11 |        5 |          1 |
> |      11 |       36 |          1 |
> |      11 |       38 |          1 |
> +---------+----------+------------+
>
> This is what I've been able to get my query down to, for every award 
> it finds who was the top for them.  Now what I want is only the top 1 
> person from each awardID.  I tried doing a group by just awardID, but 
> then all the players are put together as one.  How can I have awardID 
> and playerID seperate but only 1 awardID?
>
> Thanks for any help,
> -Rufus
> [EMAIL PROTECTED]
> ICQ: 26037212
> http://www.LionGames.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to