SELECT
qn.id,
qn.quest_node_request,
qn.father_node_id,
qn.node_name,
qn.node_code,
qn.creater,
qn. STATUS,
qn.assigned_org,
qn.main_creater_org
FROM
quest_node qn
WHERE
qn.enabled = 1
AND qn.father_node_id IS NULL
AND qn.main_creater_org = 2019181804
AND EXISTS(SELECT 1 from quest_node GROUP BY node_name HAVING MAX(id) = qn.id )
mysql根据某一个字段去重
最新推荐文章于 2024-07-30 03:58:00 发布