(资料图)

1、上面的回答可以。

2、不过我觉得还有更简单的方法:select aid, count(distinct uid) from 表名 group by aid 这是sqlserver 的写法。

本文到此分享完毕,希望对大家有所帮助。

推荐内容