LEFT JOIN order_manage oo on tt.order_user = oo.order_user and oo.launch_time > DATE_SUB(tt.launch_time, INTERVAL 45 day) and oo.launch_time < tt.launch_time
LEFT JOIN order_manage oo on tt.order_user = oo.order_user and
oo.launch_time > DATE_SUB(tt.launch_time, INTERVAL 45 day) and
oo.launch_time < tt.launch_time
where oo.id is not null
</select>
...
...
@@ -73,7 +75,9 @@
where t1.department_id = #{departmentId}
and (t1.`status` = 3 or t1.`status` = 4)
GROUP BY t1.id) tt
LEFT JOIN order_manage oo on tt.order_user = oo.order_user and oo.launch_time > DATE_SUB(tt.launch_time, INTERVAL 45 day) and oo.launch_time < tt.launch_time
LEFT JOIN order_manage oo on tt.order_user = oo.order_user and
oo.launch_time > DATE_SUB(tt.launch_time, INTERVAL 45 day) and