For the below query Scenario 1: Current Year (Previous Week) - For eg- Week 31
sum(case when s.Date between '2016-07-17' and '2016-07-23' then s.SELLINC else 0 end) ActualSales
Scenario 2: Last Year (Previous Week) - For eg- Week 31
sum(case when s.Date between '2015-07-19' and '2015-07-25' then s.SELLINC else 0 end) LastYrVarianc
Scenario 3: Picking dates between beginning of current year till today's date
sum(case when s.Date between '2016-01-01' and '2016-09-05' then s.SELLINC else 0 end) YrToDateActual
Scenario 4: Picking dates between beginning of last year till last year today's date
sum(case when s.Date between '2015-01-01' AND '2015-09-05' then s.SELLINC else 0 end) LastYrToDateActual
Instead of hard coding the date. I would like to pick current date from machine and compare.
Week start from Sunday and ends Saturday. Any help please?