1、Calculate difference between value in current row and value in first row per group - pyspark
2、applying-a-window-function-to-calculate-differences-in-pyspark
3、https://databricks.com/blog/2015/07/15/introducing-window-functions-in-spark-sql.html
4、https://www.arundhaj.com/blog/calculate-difference-with-previous-row-in-pyspark.html
5、Spark Sql中的window函数
https://www.jianshu.com/p/42be8650509f
6、Spark 实现简单移动平均值(SMA) - 窗口函数(Window Function)
https://n3xtchen.github.io/n3xtchen/spark/2017/01/24/spark200-window-function