Re: FN-FORUM: Help/guidance with a bit of tricky php/MySQL
date posted 4th March 2008 13:08
Sorry, that should have read:
SELECT productid, variant, sum(quantity) AS quantity_alias from Order_items
WHERE orders_id IN ( select Orders_id from orders where status = 'Paid' )
group by productid, variant
order by quantity_alias desc;
Graham