feat(cube): 在订单模型中添加创建时间统计

添加订单的首次和最后创建时间统计字段,用于分析客户订单时间分布
This commit is contained in:
tikkhun 2026-01-23 14:56:25 +08:00
parent f00a0ba087
commit 4e218dd162
2 changed files with 8 additions and 2 deletions

View File

@ -153,7 +153,12 @@ cubes:
- name: total
sql: total
type: sum
- name: last_created_at
sql: date_created
type: max
- name: first_created_at
sql: date_created
type: min
pre_aggregations:
# Pre-aggregation definitions go here.
# Learn more in the documentation: https://cube.dev/docs/caching/pre-aggregations/getting-started

View File

@ -1,7 +1,8 @@
{
"measures": [
"order.total",
"order.count"
"order.count",
"order.last_created_at"
],
"dimensions": [
"order.customer_email"