我有一个带有如下数组列的数据集:
+--------+--------------------+
|user_id |array_of_items |
+--------+--------------------+
|4049494 |[x1, x2, x3, x4, x5]|
|3046908 |[x6, x7, x8, x9] |
...
如何在不使用 udf 的情况下仅使用 SQL 来查找如下所示的数组?
+--------+----------------------------+
|user_id |array_of_items_diff |
+--------+----------------------------+
|4049494 |[x2-x1, x3-x2, x4-x3, x5-x4]|
|3046908 |[x7-x6, x8-x7, x9-x8] |
...