Grouping by more than one column
Group by two columns and you get one row for each combination that exists:
SELECT channel, status, COUNT(*) AS orders
FROM orders
GROUP BY channel, statusThat's a row for Online + Completed, Online + Cancelled, Phone + Completed and so on: the same numbers you'd see in a pivot table, laid out as a list.
The order of the columns in GROUP BY doesn't change the answer, only which columns you list in
SELECT and how you sort them.