Question : sql to find highest to lowest salary

I have a tbl with the following data in it

Company      Salary
PPX      50,000
PPX      40,000
PPX               40,000
PPX      20,000
FFS      60,000
FFS               55,000
FFS      45,000

I want to insert it into a tbl like this

Company      salary1      salary2      salary3      Salary4
PPX      50,000      40,000      40,000      20,000
FFS      60,000      55,000      45,000

salary1 is easy its just the max salary grouped by company
but I'm not sure how to get the rest.  Some may even have the same salary, see 40,000






Answer : sql to find highest to lowest salary

From wikipedia, the definition of computer programming is as follows:
"Computer programming (often shortened to programming or coding) is the process of designing, writing, testing, debugging  / troubleshooting, and maintaining the source code of computer programs"

As you are not creating source code of a computer program, instead you are just retrieving or inputting data into a database, you are not programming when writing SQL.

Programming processes include input>functions>output to get something new from the data which you put into the program in the first place. If you are just sending and retreiving the same data in different forms or places, SQL is not technically programming, just as HTML is coding not programming also. Hope this helps.
Random Solutions  
 
programming4us programming4us