msql中左连接查询数据未出显 eip项目
select sum(a.duration_time) as quantity,b.dept_name,b.user_quantity from blade_employee_training_record_dept_user_quantity b
LEFT JOIN (select * from blade_employee_training_record_detail
where tenant_id=#{tenantId}
<if test="startDate !=null and startDate !='' ">
and end_training_date >= #{startDate}
</if>
<if test="startDate !=null and startDate !='' ">
and end_training_date >= #{startDate}
</if>
) a on a.dept_name=b.dept_name
GROUP BY b.dept_name

浙公网安备 33010602011771号