Column 'id' in group statement is ambiguous