Link to home
Start Free TrialLog in
Avatar of metropia
metropiaFlag for United States of America

asked on

query that looks back 12 weeks

In my query, I need to look at the last 12 week ending dates, or 12 months in the where clause. Could anyone help me out adding this clause?

My query:

select week_ending as 'Week Ending', 
          convert(decimal(10,2),
          avg(roll_change_time)) as 'Average Roll Change Time' 
from roll_change_data
group by week_ending

Open in new window



Thank you much.
ASKER CERTIFIED SOLUTION
Avatar of sventhan
sventhan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of metropia

ASKER

thank you, and how to get the last 12 weeks?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thank you guys!