Collapse order status into groups and count orders in each:
- •
complete — paid or delivered - •
reversed — refunded or cancelled - •
unknown — status is NULL - •
other — anything else
Return status_group, orders. Only groups that have orders appear. Sort in the business order complete, reversed, unknown, other — not alphabetically.