2
我想這個返回工作日,但我不明白s.a
和s(a)
在此查詢:什麼是「山」的意思是在這個generate_series()查詢
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;
有人能解釋它我?
爲什麼我們在第一個子選擇中與s.a求和? – Jacomini