Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Get Data Last 5 Days average data if value is less then 100000 Expand / Collapse
Author
Message
Posted Saturday, December 7, 2013 12:57 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 1:08 PM
Points: 8, Visits: 46
Hello Experts !

I have a data sheet attached as a sample...

In column B dates are placed, Column C having data, column D average data of last 5 days and column E having forcasted values.

My question i need a sql query which looks if the data in column C is less then column E ( 100000 value) then go to and get last previous 5 days values as average?

Tnx




  Post Attachments 
Avg.xlsx (14 views, 10.47 KB)
Post #1520793
Posted Monday, December 9, 2013 4:26 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, August 28, 2014 3:22 AM
Points: 69, Visits: 495
farrukhhameed786 (12/7/2013)
Hello Experts !

I have a data sheet attached as a sample...

In column B dates are placed, Column C having data, column D average data of last 5 days and column E having forcasted values.

My question i need a sql query which looks if the data in column C is less then column E ( 100000 value) then go to and get last previous 5 days values as average?

Tnx




Maybe some friendly advice?

Not everyone is that comfortable opening up attachements and even then you word your question more like you're trying to get someone to do your work for you?
Maybe you post what you have tried and exactly where you are stuck, I bet you get better and more targeted help then.
Post #1521014
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse