American ExpressData Engineer · Technical ScreenCodemia practiceTop Merchant Category per Card Member With Ties
Given a transactions table (card_member_id, txn_date, merchant_category, amount_usd, status) and refunds recorded as negative amounts, write SQL that returns, for each card member, the merchant category with the highest net spend in the last full calendar month, keeping all categories tied for first.
Medium
Data Manipulation (SQL/Python)