如何显示未包含在 group by 子句中的列?
select user_id,DecryptString(first_name) as first_name, DecryptString(last_name) as last_name, DecryptString(middle_name) as middle_name,count(*)
from mamt
where middle_name<>'9ZnIFajWgaw='
group by first_name,middle_name,last_name having count(*) >1;
在上面的查询中,user_id 不在 group by 子句中。但我希望它显示出来。怎么做到呢?