Oracle统计邮件域的语句
select substr(lower(t1.email),instr(t1.email,'@',-1))
DOMAIN,COUNT(distinct t1.email) from FEG_ISU.LOYALTY_MEMBER T1&noracle账号bsp;
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;
作者 明四