title: array_agg_transfn called in non-aggregate context postgres
body: <p>I have a week_value column from the table "vin_temp_table" with the following values.I am using Greenplum database with postgres 8.2 on it.</p>
  
  <pre><code>633
  423
  389
  348
  341
  326
  321
  316
  301
  293
  291
  1
  2
  </code></pre>
  
  <p>Now I am trying to aggregate the next 13 values from the current column and am trying to put them in an array using the following query but I get the error "array_agg_transfn called in non-aggregate context postgres". Could some one help me out. Thanks!</p>
  
  <pre><code>select a."Week_value", array_agg(a."Week_value") over(order by prod_name,week_date desc rows between 0 preceding and 12 following) 
  from vin_temp_table a
  </code></pre>
  
  <p>So,for example the first row array result contains 13 values including itself until the next 13 column values {633,423, 389, 348, 341, 326, 321, 316, 301, 293, 291 ,1 ,2 }</p>