I'm using the below query to get datas from mysql database.
select component,count(component) as Quantity from mfgGroup where
period between '2013-01-01' and '2013-12-31'
I'm getting almost 100+ rows as a result.
Now i want to display only top 25 components.so I modified the query as below
select component,count(component) as Quantity from mfgGroup where
period between '2013-01-01' and '2013-12-31' limit 0,25
But i what i need is to display the top 25 items and rest of the components should be tagged as 'Others' with the quantity numbers.
Like these below in the resultset.
Item1 123
Item2 112
....
....
Item25 24
Others 156
156in theOthersline? Is it the number of other rows?