I have a table that has a column with comma delimited email addresses. Is there a way in a single select statement to parse them out and do a group by on them?
In a table like this:
ID Emails
1 email@domain.com, email2@domamin.com
2 email2@domain.com, email3@domain.com
Return something like:
Email Count
email@domain 1
email2@domain.com 2
email3@domain.com 1
i know i can do this with cursors and temp tables, but i wasn't sure if there was some neat trick to doing this with a select and nested select statements.
Thanks in advance.