with daysdt as ( select dd, extract(DOW from dd) dw from generate_series('2022-08-01'::date , '2022-08-31'::date, '1 day'::interval) dd ) select dd::date,dd::date + 20 from daysdt where dw not in (6,0)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)