1)检查来自tb_pre_sale的id是否在列seler_0上不存在或者是否存在但至少重复2次
2)获取最老的
谢谢!
SELECT DISTINCT seller_0
FROM tb_pre_sale
WHERE seller_0 !=?
GROUP BY id
ORDER BY COUNT(*) < ? DESC
答案 0 :(得分:0)
SELECT seller_0
FROM tb_pre_sale
WHERE seller_0 !=?
GROUP BY seller_0
HAVING COUNT(*) < ? ORDER BY seller_0 DESC