MySQL Forums
Forum List  »  Newbie

Counting and Sorting data from a table
Posted by: Robert James Love
Date: April 04, 2005 12:15PM

In my table i have a few records as follows:

CD_NO || CD_NAME || TRACK_01 || TRACK_02 || TRACK_03 || TRACK_04 || TRACK_05 || TRACK_06 || TRACK_07 || CD_COST || ACCOUNT_NO

1 || The 1st CD || 93 || 94 || 95 || 37 || 47 || 109 || 62 || 9.2 || 2
2 || The 2nd CD || 133 || 45 || 47 || 109 || 32 || 84 || 21 || 12.35 || 4
3 || The 3rd CD || 5 || 34 || 24 || 47 || 43 || 36 || 112 || 10.2 || 5

What i wish to do is find out the most 10 most frequent tracks (ie. numbers) that appear and display them in a list in descending order.

Does anybody know the MySQL query i should use to perform this task?

Regards,
Robert James Love.

Options: ReplyQuote


Subject
Written By
Posted
Counting and Sorting data from a table
April 04, 2005 12:15PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.