mysql 两个表联合查询数据条数,并要除去重复的数据 SELECT COUNT(DISTINCT AA.字段)FROM(SELECT 字段FROM TABLE1UNION ALLSELECT 字段 FROM TABLE2)AA;
mysql 查询重复数据取其中一条 数据select a.*from t1 as a where i_time=(select max(i_time)from t1 where a.number=number)查询结果
MySql怎么查询重复的数据 SELECTSUM(num)as '总数'FROMtd_textWHERENAME IN(SELECT NAME FROM td_text GROUP BY NAME HAVING count(NAME)>;1)GROUP BY `name`td_text 表数据:执行sql后