All pastes #394412 Raw Edit

Untitled

public text v1 · immutable
·published 2007-03-14 09:37 UTC
rendered paste body
churn=#  update churn_trend set ov_churn_rate=tre.previous from (SELECT (select
total_customer from churn_trend as ct2 where ct2.month=churn_trend.month-1)-tota
l_customer AS previous from churn_trend) as tre where month>=2;

UPDATE 11

churn=# select month,total_customer,ov_churn_rate from churn_trend;
 month | total_customer | ov_churn_rate
-------+----------------+---------------
     1 |         136281 |             0
     2 |         119885 |
     3 |         109434 |
     4 |         101730 |
     5 |          95593 |
     6 |          90426 |
     7 |          86009 |
     8 |          82687 |
     9 |          79180 |
    10 |          75991 |
    11 |          73245 |
    12 |          70587 |
(12 rows)


here i got 11 updates but when i try to retrieve the data nothing is there?

why it is pls tell me