SQL 2005 - Combine data from field across multiple rows into a derived field on a single row
This has been asked before, but I'm not seeing an exact match on what I need to do.
Overall, I have a table of sales reps and they make sales with the help of assistants.
I need to send emails to the sales reps and CC: all the assistants who have helped during the months. The trick is I need to combine the email address from each sales rep (across multiple rows) into a single derived field.
I also need to see a total of all sales that sales rep did across ALL Assistants.
I've attached an Excel example excerpt that really describes this well. A picture is worth a thousand words I guess.
Looking forward to some really great help as usual!