MySQL 语句优化求解答
发布网友
发布时间:2022-05-07 07:22
我来回答
共1个回答
热心网友
时间:2022-05-07 08:51
试试用left join
SELECT A.id
FROM c_company A,
LEFT JOIN c_proct B ON A.userid=B.userid
WHERE A.state=1 AND A.map!=''
GROUP BY B.userid
ORDER BY A.id DESC LIMIT 10
追问一样的
追答语句中 group by 的改为A.userid呢?