Avatar of Jay Roy
Jay Roy
Flag for United States of America

asked on 

fetching data from last 5 days

hi guys

i have a table Sale_Region like


sale_Date   region    customer_name

2013-05-19     UK                  Jay
2013-03-1      US                  Jack
2013-05-22     AUS                 Jill
2013-05-21     UK                  Anthony



I want to return three columns max(sale_Date) , sale_Date which is 5 working days before  max(sale_Date),
region from the table

any idea how i can do that?



thanks
Microsoft SQL Server 2008

Avatar of undefined
Last Comment
Jim Horn

8/22/2022 - Mon