Oh man, I'm on a roll:
SELECT
afid
, sid
, sum(order_Status != "DECLINED") as Approved
, sum(order_Status = "DECLINED") as Declined
, monthname(date_Of_Sale)
FROM
little_test_table
Group BY
month(date_of_sale), afid, sid
;
Hopefully this stuff will come in handy for other people! I've spent countless hours on this site trying to educate myself on creating queries. It must finally be sinking in ...
Thanks for letting me post.
Nichole