Skip to content

Commit

Permalink
update model
Browse files Browse the repository at this point in the history
  • Loading branch information
carlineng committed Sep 23, 2024
1 parent 441c65b commit 050fc38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ecommerce/ecommerce.malloy
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ source: order_items is order_items_table extend {
# percent
percent_of_sales is total_sales/all(total_sales)
# currency
total_gross_margin is gross_margin.sum()
average_gross_margin is gross_margin.avg()
total_gross_margin is source.sum(gross_margin)
average_gross_margin is source.avg(gross_margin)
product_count is count(inventory_items.product_id)
user_count is users.count()
total_sales_2022 is total_sales { where: year(created_at) = 2022 }
Expand Down

0 comments on commit 050fc38

Please sign in to comment.