这是我的初始查询:
SELECT bid_tag.*
FROM bid_tag join
(select serial_number, count(*) as cnt
from bid_tag where user_id = 0
group by serial_number
) tsum
on tsum.serial_number = bid_tag.serial_number and cnt > 1
order by bid_tag.serial_number
LIMIT 0, 21000;
现在从这些结果中,我需要选择所有位置tag_design = 0 AND tag_size = 0
,然后DELETE
从数据库中选择这些记录。
我只是不知道如何对初始查询的结果运行查询。