How to calculate the slope in SQL

前端 未结 4 1184
一整个雨季
一整个雨季 2020-12-28 18:41

I have some data in a sql database and I\'d like to calculate the slope. The data has this layout:

Date        |  Keyword  |  Score    
2012-01-10  |  ipad          


        
4条回答
  •  一向
    一向 (楼主)
    2020-12-28 19:13

    Cast to decimal does not give correct results for me, it is not linear to the dates. Use TO_DAYS(date_field) instead, this becomes correct.

提交回复
热议问题