查询分组后相同值和不同值统计,分组后查询前几条、某字段拼接

1、查询分组后相同值和不同值统计的个数 相同值 select cust_code, count(*) from CRC_RATE_RESULT where type = ‘1’ group by cust_code ; 不同值 select count(distinct cust_code) from CRC_RATE_RESULT where type = ‘1’; 2、查询分组后相同内容的前几
相关文章
相关标签/搜索