I'd like to compare the total sales number by merchants and by mounth.
I use PHP and mySQL.
when I use below select statement it works perfectly fine but it only gives me November figures
SELECT merchant,sum(total) as mytotal, month FROM `sales` where month='11' group by merchant order by mytotal desc
How can I compare the two months data (10-11 months)? I'd like to see the merchants whom sales declines compared these two months.
How should I write the mySQL statement?