标签:bsp style 复数 查询 字段 log class pre color
/* 手机号为重复的会员,获取其最大会员id,对应的会员信息 */ SELECT * FROM MEMBER a WHERE a.member_id IN ( SELECT MAX(member_id) FROM MEMBER b WHERE b.mobile IN (SELECT mobile FROM ( SELECT t.mobile,t.mobile_state,t.is_delete FROM MEMBER t WHERE t.is_delete=‘N‘AND t.mobile_state=‘Y‘ AND t.mobile=‘mobile‘ GROUP BY t.mobile,t.mobile_state,t.is_delete HAVING COUNT(*)>1 ) )
标签:bsp style 复数 查询 字段 log class pre color
原文地址:http://www.cnblogs.com/wangchuanfu/p/6098693.html