Given a dataset of rider transactions, how would you use Excel to identify anomalous patterns indicating potential chargeback fraud on Uber?
For this SQL exercise, translate that analysis into a query using the provided rider, transaction, and chargeback data. Include completed transactions, calculate rider-level chargeback metrics, and flag riders meeting the anomaly criteria.
Output
- One row per flagged rider, with
rider_id, rider_name, transaction_count, total_amount, chargeback_count, chargeback_rate, and anomaly_reason.
- Include riders with at least two completed transactions and either at least two chargebacks or a chargeback rate of at least 0.50.
- Order by
chargeback_rate descending, then rider_id ascending.