distinct A,B,C过滤掉3个字段都相同的记录
1.不需要统计数量
select distinct a,b,c from A;
2.需要统计数量
select count(distinct a,b,c),count(*),a,b,c from A group by a,b,c;
select count(distinct di.devOrg,di.devRegion,di.devType,dp.frequency,dp.monStatus),count(*),di.devOrg,di.devRegion,di.devType,dp.frequency,dp.monStatus from res_deviceinfo_tbl di,res_devparam_tbl dp where di.devId=dp.devId group by dp.frequency,dp.monStatus