I'm attempting to produce a report showing production levels. The report will be run each day and will need to display only the previous day's activity. We work a normal 5-day work week, so I need to remove weekends from the query criteria.
example: select name, count(InstallID) from install where complete_date = Date()-1;
I thought there may be a way to produce an IF statement that will look at the weekday and if it is Monday the criteria will be 'Date()-3', Sunday will be 'Date()-2', and otherwise it will be 'Date()-1'.
So far I have not been able to find the proper syntax for this query. Can anyone provide some information or point me in the proper direction.