The scenario is: It is required to find out how many days an account is active during the time selected from a date range prompt. To determine when an account is active, there are several different pay type start and end dates to look at. Basically if there is one pay type active on that date then it is count as active date for the account and if none of the pay types is active then it cannot be calculated.
EXAMPLE:



