SELECT FACT.*,
  (LA.TOTAL_DAYS-LA.BALANCE) AS ACTUAL_DAYS
FROM HRIS_EMPLOYEE_LEAVE_ASSIGN LA
JOIN
  (SELECT LR.EMPLOYEE_ID,
    LR.LEAVE_ID,
    COUNT(LR.LEAVE_ID) AS DAYS
  FROM HRIS_EMPLOYEE_LEAVE_REQUEST LR,
    (SELECT *
    FROM HRIS_MONTH_CODE
    WHERE TRUNC(SYSDATE) BETWEEN FROM_DATE AND TO_DATE
    ) M
  WHERE (LR.START_DATE BETWEEN M.FROM_DATE AND M.TO_DATE)
  AND LR.LEAVE_ID=10
  AND LR.STATUS  ='AP'
  GROUP BY LR.EMPLOYEE_ID,
    LR.LEAVE_ID
  ) FACT
ON (LA.EMPLOYEE_ID=FACT.EMPLOYEE_ID
AND LA.LEAVE_ID   =FACT.LEAVE_ID);