Below is my Table
Table1
+--------+----------+---------+
| amount | make | product |
+--------+----------+---------+
| 100 | Nokia | Mo
select product, make, amount, rnk
from (
select l.product, l.make, l.amount, count(*) as rnk
from table1 as l
left join table1 as r
on (r.product = l.product and l.amount <= r.amount)
group by l.product, l.make
) a
where rnk <= 2
see the ideea and other examples here: http://www.xaprb.com/blog/2005/09/27/simulating-the-sql-row_number-function/
and sql fiddle based on zane bien test data.