The Payments Grid
MediumDescription
Count the payments for every method and status pair. Add a total row for each method
(with NULL as the status), a total row for each status (with NULL as the method) and a grand
total (NULL in both). Show method, status and payments.
End your query with ORDER BY method, status. The NULL total rows sort last.
Tables
| payments |
|---|
| payment_id (PK) |
| amount |
| method |
| status |