Interview Guides
You are given a large Mastercard transaction fact table and a merchant dimension. Write a PostgreSQL query to return the top 5 merchants by transaction volume for each country for the last calendar month. Treat volume as the count of transactions, exclude rows with a null merchant_id, and break ties by higher transaction count first, then lower merchant_id.