Merchants with too many refunds

MediumPayPalctescross joinjoinsratios· 20 XP

A merchant with many refunds may be selling faulty goods, or worse. PayPal's merchant risk team flags merchants whose refund rate is far above normal.

Find merchants with at least 20 transactions whose refund rate (share of their transactions with status 'refunded') is more than twice the overall refund rate across all transactions.

Expected output

  • refund_rate_pct rounded to 1 decimal; any row order

Example of the shape (made-up values):

merchant_id merchant_name txns refund_rate_pct
17 Urban Wear 17 41 14.6

Hints, the later steps and the answer come with Pro.

Write your query here. Ctrl + Enter submits.