I count the number of working days using a query in SQL:
SELECT day :: DATE, extract('dow' FROM day) BETWEEN 1 AND 5 AS working_day FROM generate_series('2015-01-01', (date_trunc('day', pday() + INTERVAL '1 month') :: DATE - 1) , INTERVAL '1 day') AS day How can I take holidays into this request? I have a separate Holidays table that looks like this: country, date, type. And I need to consider only for certain countries of the Federal Holidays (This is indicated in the type column).
