REST API
I have two tables named attendance_device_user and attendance_device_missing_punch. Legal entity defined for all user in attendance_device_user table.
What I wish to achieve is that I want only the IT legal entity user can apply the missing punch request ONLY 3 times in a month for eg (20th june to 21st july payroll cycle). For this requirement I have written the query which is given below. I wanted to throw an error if user applies more than three times in period cycle.
SELECT
CASE
WHEN adu.LEGAL_ENTITY = ' Information Technology Global Private Limited'
AND NVL(mp.request_count,0) <= 3