Mysql salary calculation

Discussion in 'MySQL' started by ghosh.ag, Mar 17, 2011.

  1. #1
    I want to display 1st highest,2nd highest,3rd highest ....nth number of employee

    salary list in mysql database.

    if it is possible please send me that sql query to my email address.

    Thanks
    Email: ghose098765@gmail.com
     
    ghosh.ag, Mar 17, 2011 IP
  2. artus.systems

    artus.systems Well-Known Member

    Messages:
    87
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    103
    #2
    Do you have a table created ?
     
    artus.systems, Mar 18, 2011 IP
  3. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #3
    So you want to add a Order By Salary_Column Descending and then a Limit N to cap the number you want
     
    AstarothSolutions, Mar 18, 2011 IP
  4. ghosh.ag

    ghosh.ag Guest

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    yes, I want to display all the employee list according to 1st highest to nth highest salary? Give me mysql command
     
    ghosh.ag, Mar 18, 2011 IP
  5. lukefowell89

    lukefowell89 Peon

    Messages:
    182
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You cant simply give you the mySQL command, since you have given a table to perform the query upon. But you could possibly have something like this: -

    SELECT * FROM table_name ORDER BY salary DESC LIMIT (number)
     
    lukefowell89, Mar 21, 2011 IP