feat(cube): 在订单模型中添加创建时间统计
添加订单的首次和最后创建时间统计字段,用于分析客户订单时间分布
This commit is contained in:
parent
f00a0ba087
commit
4e218dd162
|
|
@ -153,7 +153,12 @@ cubes:
|
||||||
- name: total
|
- name: total
|
||||||
sql: total
|
sql: total
|
||||||
type: sum
|
type: sum
|
||||||
|
- name: last_created_at
|
||||||
|
sql: date_created
|
||||||
|
type: max
|
||||||
|
- name: first_created_at
|
||||||
|
sql: date_created
|
||||||
|
type: min
|
||||||
pre_aggregations:
|
pre_aggregations:
|
||||||
# Pre-aggregation definitions go here.
|
# Pre-aggregation definitions go here.
|
||||||
# Learn more in the documentation: https://cube.dev/docs/caching/pre-aggregations/getting-started
|
# Learn more in the documentation: https://cube.dev/docs/caching/pre-aggregations/getting-started
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
"measures": [
|
"measures": [
|
||||||
"order.total",
|
"order.total",
|
||||||
"order.count"
|
"order.count",
|
||||||
|
"order.last_created_at"
|
||||||
],
|
],
|
||||||
"dimensions": [
|
"dimensions": [
|
||||||
"order.customer_email"
|
"order.customer_email"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue