再一次来求助了~请求大佬 就是这一段代码,在orcal可以,现在需要转为mysql请问应该怎么改呢
[SQL] 纯文本查看 复制代码 SELECT
MAX(COUNT(DISTINCT qodi_Id))
FROM
(
SELECT
qod.qodi_Id,
qod.qodi_lsro_id
FROM
Qk_Order_Distribute qod
LEFT JOIN LG_STORE_ROOM lsr ON lsr.lsro_id = qod.qodi_lsro_id
LEFT JOIN qk_Order qo ON qo.qord_id = qod.qord_id
LEFT JOIN qk_Literature ql ON ql.qlit_id = qo.qlit_id
WHERE
qod.acct_id = 22
AND qo.qord_Year = '2021'
) qod
LEFT JOIN (
SELECT
qui.lsro_Id
FROM
Qk_Unit_Info qui
LEFT JOIN qk_Year_Vol_Period qyvp ON qyvp.qyvp_id = qui.qyvp_id
LEFT JOIN qk_Order qo ON qo.qord_id = qyvp.qord_id
LEFT JOIN qk_Literature ql ON ql.qlit_id = qui.qlit_id
WHERE
qui.acct_id = 22
AND qui.quin_Flow_State = 2
AND qo.qord_Year = 2021
) qui ON qui.lsro_id = qod.qodi_lsro_id
WHERE
qui.lsro_id IS NULL
GROUP BY
qod.qodi_lsro_id |