dongoewang commented on issue #30032:
URL:
https://github.com/apache/shardingsphere/issues/30032#issuecomment-1931370708
i modified the sql ,then program can run。but i don't know this configuration
is right or wrong
previous ql:
SELECT
COUNT(*)
FROM
kq_employee_clock_record a
LEFT JOIN hr_employee e ON a.employee_id = e.id
LEFT JOIN hr_organ_position p ON e.post_id = p.id
LEFT JOIN kq_attendance_daily kad ON kad.id = (
SELECT
id
FROM
kq_attendance_daily
WHERE
delete_flag = 0
AND employee_id = a.employee_id
AND attendance_date = date_format( a.clock_time, '%Y-%m-%d' )
LIMIT 1
)
WHERE
a.type = 2
AND a.flow_flag = 1
AND ( kad.id IS NULL OR e.is_overtime != '1' OR kad.work_type != '0' )
AND ((
a.attendance_date >= ?
AND a.attendance_date <= ?))
present sql :
SELECT
COUNT(*)
FROM
kq_employee_clock_record a
LEFT JOIN hr_employee e ON a.employee_id = e.id
LEFT JOIN hr_organ_position p ON e.post_id = p.id
LEFT JOIN kq_attendance_daily kad ON kad.id = (
SELECT
id
FROM
kq_attendance_daily
WHERE
delete_flag = 0
AND employee_id = a.employee_id
AND attendance_date = date_format( a.clock_time, '%Y-%m-%d' )
LIMIT 1
)
WHERE
a.type = 2
AND a.flow_flag = 1
AND ( kad.id IS NULL OR e.is_overtime != '1' OR kad.work_type != '0' )
AND ((
a.attendance_date >= ?
AND a.attendance_date <= ?)) AND (( kad.attendance_date >= ?
AND kad.attendance_date <= ?))
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]