are u sql master?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    are u sql master?

    hi do know answer for this question..
    i want to select minimum unique(single)
    value from a db table.
    i know hot to select minimum value but i
    dont know how to select minimum + single
    value.. here we see this example
    -------------
    table name - salary
    name | amount
    jhon 1000 sam 3000
    peter 1000
    smith 6000
    alex 2000
    sara 5000
    there r two minimum values (jhon and
    peter). but i want to select minimum unique
    (single) value .
    so result should be alex. coz minimum
    value is uncommon (single)
    Last edited by arnage; 01.04.12, 19:47. Reason: Retrieving post data so topic can be useful :)

    #2
    PHP Code:
    SELECT MIN(amountFROM salary GROUP BY amount HAVING(COUNT(amount)<2

    Comment


      #3
      thanks mate .. thats what i need.

      Comment


        #4
        pity you deleted your question as it could have helped someone else @ amore
        topic might aswell be deleted now

        TY arnage for bring this topic back im sure it will help someone else
        Last edited by something else; 02.04.12, 00:32.

        Comment

        Working...
        X