forked from dbt-labs/jaffle-shop-classic
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct fnl model for customer returns
Signed-off-by: Joanna Lau <[email protected]>
- Loading branch information
Joanna Lau
committed
Aug 14, 2023
1 parent
f48b490
commit b29cee8
Showing
4 changed files
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
jaffle_shop/models/final/finance/fnl_finance_customerorders.sql
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
jaffle_shop/models/final/finance/fnl_finance_customerreturns.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
SELECT | ||
customer_id | ||
, SUM(amount) AS total_returned_amount | ||
FROM {{ ref('wh_orders') }} | ||
WHERE status IN ('return_pending', 'returned') | ||
GROUP BY customer_id |
File renamed without changes.