OP05: Average length of observation, in month

Count average length of observation period in month.

Input:
<None>

Sample query run:
The following is a sample run of the query.
Oracle:
SELECT avg( months_between( observation_period_end_date
                          , observation_period_start_date
                          )
          ) AS num_months
  FROM observation_period;
RedShift:
SELECT avg(datediff(month, observation_period_start_date
                         , observation_period_end_date 
                   ) 
          ) AS num_months
FROM observation_period 
Output:
Output field list:
 Field  Description
num_months Average length of observation, in month

Sample output record:
 Field  Value
num_months22
Comments