Count email type per customer id
问题 I have a form that people can use to send emails to our clients. The user has an option to select between two canned messages (Message "1" or Message "2"). Behind the scenes, every time they hit the "SEND" button it logs into a "RECORDS" table (so long as it makes it through the error handlers). Let's pretend the RECORDS table has 2 columns: CUST_ID EMAIL_NUM 0000 1 0000 2 0000 1 0000 1 0001 2 0002 1 0002 1 0003 2 0003 2 0003 2 I need a query that counts the ones and twos for each CUST_ID. So