I am using the following query to fetch data from my sql tables
SELECT tips.* ,stocks.*
FROM tips
LEFT JOIN stocks ON stocks.nse = tips.sym
WHERE tips.dat = '$day'
GROUP BY tips.sym
ORDER BY stocks.indu DESC;
I need to order the result in the order of largest occurrence first ie if there is 10 abc , 12 xyz ,8 qwe as indu , i need to display 12 xyz first 10 abc as next . then 8 qwe s.
Any help is really appreciated