作者:susan0912010311fool | 来源:互联网 | 2014-07-13 17:52
Oracle统计邮件域的语句selectsubstr(lower(t1.email),instr(t1.email,'@',-1))DOMAIN,COUNT(distinctt1.email)fromFEG_ISU.LOYALTY_MEMBERT1whereT1.EMAILISNOTNU
select substr(lower(t1.email),instr(t1.email,'@',-1))
DOMAIN,COUNT(distinct t1.email) from FEG_ISU.LOYALTY_MEMBER T1
where T1.EMAIL IS NOT NULL www.2cto.com
AND T1.EMAIL LIKE '%@%'
AND LENGTH(t1.EMAIL)=LENGTHB(t1.EMAIL)
GROUP BY substr(lower(t1.email),instr(t1.email,'@',-1)) order by 2 desc;
作者 明四