Marketing wants to send each customer offers for their top two merchant categories by spend. The transaction table records the customer, merchant category and amount. For example, customer 101 spent 800 on dining, 800 on groceries, 300 on gas and 100 on travel. How would you write SQL to get each customer's top two categories, and what happens when there are ties?