我正在尝试返回工作日,但我不明白s.a
,s(a)
在此查询中:
SELECT dia
FROM (
SELECT ('2012-08-01'::date + s.a * '1 day'::interval) AS dia
FROM generate_series(0, '2012-08-31'::date - '2012-08-01'::date, 1) AS s(a)
) foo
WHERE EXTRACT(DOW FROM dia) BETWEEN 1 AND 5
EXCEPT
SELECT feriado_data FROM teste.feriado;
有人可以为我解释一下吗?