I have made an attendance table for workers which looks like this
Now I need a query which returns the sum of total days attended for each worker. However, there is a caveat. Normally, each worker can work only during weekdays, but if they show up 3 or more days in any given week they would get an extra day credited to them (as if they have also worked on Saturday).
The sums are calculated for each month. So even if the first week of the month starts on a Friday, should the worker have showed up at least 3 days on that week, they will get the extra day on the current month.