#32

Apple Pay and other payment totals

Visa is analyzing its Apple Pay partnership. For each merchant_id, calculate the total transaction amount paid via Apple Pay in the apple_pay_amount column and the total paid via all other payment methods in the other_amount column. Return the three columns.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

merchant_idother_amountapple_pay_amount
35500
5950400
401500
Visa

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid