About this question
I am trying to get a unique list from contacts using a group by but for some reason I am getting an error. If I use Workbench with the same SOQL query it would be fine but I am getting a Syntax Error in Apex.
ListlstContact = ([SELECT ID, Name, Email FROM Contact WHERE Email IN: pAddress group by ID, Name, Email]); Error: Illegal assignment from Listto List