added date logic to get last month
special calcs for unique customers in case statement