Find REGR_SLOPE with dates?

How can I use REGR_SLOPE with dates? I know it only takes numbers as input, but I would like find the REGR_SLOPE as a function of time.  My table is as follows:

Table
--------------------
Num | Date
1      | 10-JAN-07
3      | 30-JAN-07
7      | 11-FEB-07
5      | 13-FEB-07
5      | 19-FEB-07
3      | 03-MAR-07

I only need a 90 day range if that makes a difference.
evotsiAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
sdstuberConnect With a Mentor Commented:
to treat your dates as numbers, convert them to their Julian value

SELECT   regr_slope(to_number(to_char(yourdate,'j')),num)
  FROM   yourtable
0
 
SujithData ArchitectCommented:
You are trying to find the REGR_SLOPE of which column? Aggregated at which column?
0
 
evotsiAuthor Commented:
I am trying to find the REGR_SLOPE of the 'Num' column across a timespan.  For example the table could also be seen as:

Table
--------------------
Num | Date
1      | 1
3      | 30
7      | 42
5      | 44
5      | 50
3      | 62

In which case I believe REGR_SLOPE(Date,Num) would get me what I want.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.