Please find the below querys, it is not working on Monday and it is working on rest of days.
select distinct date '2013-12-23'-dayofweek(date '2013-12-23'-2)-1 from fact;
ans : 12/15/2013
select distinct date '2013-12-24'-dayofweek(date '2013-12-24'-2)-1 from fact;
12/22/2013
select distinct date '2013-12-25'-dayofweek(date '2013-12-25'-2)-1 from fact; 12/22/2013 12/22/2013 is the last week end date .
Please find the below querys, it is not working on Monday and it is working on rest of days.
select distinct date '2013-12-23'-dayofweek(date '2013-12-23'-2)-1 from fact;
ans : 12/15/2013
select distinct date '2013-12-24'-dayofweek(date '2013-12-24'-2)-1 from fact;
12/22/2013
select distinct date '2013-12-25'-dayofweek(date '2013-12-25'-2)-1 from fact;
12/22/2013
12/22/2013 is the last week end date .