diff --git a/container/cube/conf/model/cubes/order.yml b/container/cube/conf/model/cubes/order.yml index 1ec175d..3e91941 100644 --- a/container/cube/conf/model/cubes/order.yml +++ b/container/cube/conf/model/cubes/order.yml @@ -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 diff --git a/container/cube/query/customer_order_price_sum.json b/container/cube/query/customer_order_price_sum.json index de03b13..6ea8b5c 100644 --- a/container/cube/query/customer_order_price_sum.json +++ b/container/cube/query/customer_order_price_sum.json @@ -1,7 +1,8 @@ { "measures": [ "order.total", - "order.count" + "order.count", + "order.last_created_at" ], "dimensions": [ "order.customer_email"