I have a dataset with diagnosis records, where a patient can have one or more records even for same code. I am unable to use group by variable \'code\' since it shows error