查詢分組後相同值和不同值統計,分組後查詢前幾條、某字段拼接

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、查詢分組後相同內容的前幾
相關文章
相關標籤/搜索