Results 1 to 2 of 2

Thread: SQL Max Count

  1. #1
    Join Date
    Jan 2013
    Posts
    1

    Question Unanswered: SQL Max Count

    Hi everyone!

    I'm studying right now SQL and I can't solve a problem. I tried for a long time, searching on Internet and in other threads of this forum, but I haven't found nothing. So, here's my trouble:

    I need to understand how to structure one kind of query. I'm gonna start with an example:

    Code:
    SELECT B.NAME, MAX(SUM(M.AWARD))
    FROM MAILLOT M JOIN BRING B
    ON M.CODE=B.CODE
    GROUP BY B.NAME
    This is wrong. And I always fail this kind of query. I mean, that kind of query when you need to know only one outcome (in this example: B.DORSAL, so the one who won the highest award) and, to do this, you use a command like MAX, COUNT, SUM, etc.
    My rational logic says me every time that I shall do it as the example, but never works.

    So, how that kind of querys is structured?


    Thanks for the info!
    And sorry for my bad english and sorry if isn't comprehensible,
    I'll try to explain it again
    Sincerly,

    R

  2. #2
    Join Date
    Jun 2004
    Posts
    796
    Provided Answers: 1
    Have a read of this article, then if you still have questions feel free to ask:

    SQL: MAX Function
    90% of users' problems can be resolved by punching them - the other 10% by switching off their PCs.

Posting Permissions

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