Hi

I am using mysql 3.23 & have a table 'scores' with following structure

comp    int(11)
score    int(11)

I have total 1 lakh rows

consider following sample data

comp    score
~~~~~~~~~
1            0.25
2            2.5
2.            1.7
1            0.1
3            0.9
1            0.3

I want to sort my data such a way, the company having maximum score should come at top followed by all its rows in descending order of scores
and after that company having the next highest score should come followed by all rows of that company. Also i want to know if i can limit the rows within a company.


my data should come in following way:

comp score
~~~~~~~~~
1 3.71
1 0.3
1 0.1
2 2.5
2 1.7
3 0.9


regards
Pawan



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to