I'm attempting to write a query to pull credit cards that were used at at least two merchants from a list of merchants.
My table has card_number and merchant_name fields. There is row for every card transaction.
Lets say I have merchant_a, merchant_b, merchant_c, and merchant_d. I want to find cards that were used at least two of those merchants. I'm not sure how I would go about finding cards that were used at at least two of those merchants and not end up with cards that were used at say merchant_a twice.
Any help would be greatly appreciated. Hopefully I explained it well enough. If not, I'll be happy to try and clarify.