ChatGPT - Calculate mean by group