select create_time,count(distinct id) as cnt from( select date_format(t1.full_time, 'yyyy_MM') as create_time, distinct t1.id as id FROM loan t1 LEFT JOIN repay_record t2 ON t1.id=t2.loan_id left join sda01_user t3 on t1.user_id=t3.id WHERE t1.full_time IS NOT NULL AND t1.status NOT IN(7,9) and date_format(t1.full_time,'yyyy-MM-dd')>='2014-05-06' ) t group by create_time order by create_time; 以上这段sql查询时候报错,一时没看出来,哪位帮忙看一下 |