本章节重点在于讲解求和、计数的窗口函数应用。
题目背景如下:
有一个订单信息表(order_info),简况如下:
id | user_id | product_name | status | client_id | date |
1 | 557336 | C++ | no_completed | 1 | 2025-10-10 |
2 | 230173543 | Python | completed | 2 | 2025-10-12 |
3 | 57 | JS | completed | 3 | 2025-10-23 |
4 | 57 | C++ | completed | 3 | 2025-10-23 |
5 | 557336 | Java | completed | 1 | 2025-10-23 |
6 | 57 | Java | completed | 1 | 2025-10-24 |
7 | 557336 | C++ | completed | 1 | 2025-10-25 |
8 | 557336 | Python | completed | 1 | 2025-10-26 |