Return 个星期天之前的结果

Return results less than two Sundays ago

我在 table 中有以下日期列。

表A

WEEKENDDATE
 2/24/2019
 3/10/2019
 6/10/2019

如何使用 where 子句仅 return 个星期天前的结果?

因此,WEEKENDDATE 列中大于两个星期日的任何日期都不会显示。

select * from TableA where 1=1 --and

我想你想要:

where weekenddate >= next_day(sysdate - interval '1' day, 'SUNDAY') - interval '14' day

(不知道你是想过去2周还是3周)

也就是说,你的约会对象似乎都是星期天,所以这看起来更简单:

where weekenddate >= trunc(sysdate) - interval '14' day