The finance team wants a breakdown of payment statuses per payment method. For each payment method, return the method name, total number of payments, count of completed payments, and total amount of completed payments (rounded to 2 decimals). Sort by total payments descending.
Schema
🔑idINT
🔗order_idINT
payment_dateTEXT
amountREAL
methodTEXT
statusTEXT
postgresql
Run your query to see results
Press Ctrl + Enter to execute