子查询中的groupby count都失效了,待解决

SELECT temp.* from nst_project np LEFT JOIN (

SELECT sum( ndr.dailyReportCountInOneDay ) dailyReportCount,
count(project_id) dayCountOfDailyReport,
ndr.* from (
SELECT
count( id ) dailyReportCountInOneDay,
project_id,
CONVERT ( create_time, date )
FROM
nst_daily_report
WHERE
CONVERT ( create_time, date ) IN ( SELECT date FROM nst_cron_calendar WHERE if_excute != 0 )
GROUP BY
CONVERT ( create_time, date )
) ndr
GROUP BY
ndr.project_id ) temp on np.id = temp.project_id

你可能感兴趣的:(子查询中的groupby count都失效了,待解决)