Write SQL and Python, run instantly in your browser, and track your progress.
You are a Financial Analyst at Amazon. The Finance team needs a list of successfully captured payments to review high-value transactions. Your task is to provide all captured payments and sort them from the largest to the smallest amount. Break ties by the smallest payment identifier. No special time window is required.
| Column Name | Type |
|---|---|
| payment_id | INTEGER |
| order_id | INTEGER |
| method | TEXT |
| processor |
You are a Financial Analyst at Amazon. The Finance team needs a list of successfully captured payments to review high-value transactions. Your task is to provide all captured payments and sort them from the largest to the smallest amount. Break ties by the smallest payment identifier. No special time window is required.
| Column Name | Type |
|---|---|
| payment_id | INTEGER |
| order_id | INTEGER |
| method | TEXT |
| processor |
| TEXT |
| TEXT |
| amount | REAL |
| amount | REAL |
| currency | TEXT |
| currency | TEXT |
| status | TEXT |
| status | TEXT |
| transaction_id | TEXT |
| transaction_id | TEXT |
| auth_time | TEXT |
| auth_time | TEXT |
| capture_time | TEXT |
| capture_time | TEXT |
| refund_time | TEXT |
| refund_time | TEXT |
| payment_id | order_id | method | processor | amount | currency | status | transaction_id | auth_time | capture_time | refund_time |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | apple_pay | stripe |
| payment_id | order_id | method | processor | amount | currency | status | transaction_id | auth_time | capture_time | refund_time |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | apple_pay | stripe |
| payment_id | order_id | amount | method | processor |
|---|---|---|---|---|
| 22 | 22 | 2733.32 | card | braintree |
| 48 | 48 | 2111.92 | apple_pay | braintree |
| 30 | 30 | 1917.24 | paypal | stripe |
| payment_id | order_id | amount | method | processor |
|---|---|---|---|---|
| 22 | 22 | 2733.32 | card | braintree |
| 48 | 48 | 2111.92 | apple_pay | braintree |
| 30 | 30 | 1917.24 | paypal | stripe |
Showing first 5 of 39 rows. Captured payments sorted by amount descending.
Showing first 5 of 39 rows. Captured payments sorted by amount descending.
| 55.32 |
| 55.32 |
| USD |
| USD |
| captured |
| captured |
| TX200002 |
| TX200002 |
| 2025-08-20 07:01:34 |
| 2025-08-20 07:01:34 |
| 2025-08-20 15:01:34 |
| 2025-08-20 15:01:34 |
| 2 | 2 | google_pay | square | 662.48 | USD | partial_refund | TX200003 | 2025-02-24 04:56:03 | 2025-02-26 06:56:03 | 2025-03-04 06:56:03 |
| 2 | 2 | google_pay | square | 662.48 | USD | partial_refund | TX200003 | 2025-02-24 04:56:03 | 2025-02-26 06:56:03 | 2025-03-04 06:56:03 |
| 3 | 3 | bank_transfer | internal | 88.66 | USD | captured | TX200004 | 2025-02-13 17:43:43 | 2025-02-14 16:43:43 |
| 3 | 3 | bank_transfer | internal | 88.66 | USD | captured | TX200004 | 2025-02-13 17:43:43 | 2025-02-14 16:43:43 |
| 4 | 4 | card | adyen | 322.87 | USD | captured | TX200005 | 2025-02-07 13:00:50 | 2025-02-09 11:00:50 |
| 4 | 4 | card | adyen | 322.87 | USD | captured | TX200005 | 2025-02-07 13:00:50 | 2025-02-09 11:00:50 |
| 5 | 5 | bank_transfer | stripe | 629.34 | USD | captured | TX200006 | 2025-06-24 03:59:58 | 2025-06-26 01:59:58 |
| 5 | 5 | bank_transfer | stripe | 629.34 | USD | captured | TX200006 | 2025-06-24 03:59:58 | 2025-06-26 01:59:58 |
| 13 | 13 | 1823.7 | card | adyen |
| 13 | 13 | 1823.7 | card | adyen |
| 75 | 75 | 1646.43 | card | paypal |
| 75 | 75 | 1646.43 | card | paypal |