Need Help with SELECT sub query...
Posted on 2008-06-25
I have a select query:
"Select company, productid, price from sales where productid IN (select productid from sales group by productid) order by productid, price".
However I want retrieve only the top 3 companies per productid with the highest spend (price).
I am looking to achieve this with one query if possible?