We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d22ff3b commit b2bc335Copy full SHA for b2bc335
models/rounding_effect.sql
@@ -0,0 +1,6 @@
1
+SELECT
2
+ order_id,
3
+ ROUND(amount) AS rounded_amount_dollar,
4
+ amount_cent,
5
+ (ROUND(amount) * 100 - amount_cent) AS rounding_difference_cents
6
+FROM {{ ref('stg_payments') }}
models/staging/stg_payments.sql
@@ -16,7 +16,8 @@ renamed as (
16
payment_method,
17
18
-- `amount` is currently stored in cents, so we convert it to dollars
19
- amount / 100 as amount
+ amount / 100 as amount,
20
+ amount as amount_cent
21
22
from source
23
0 commit comments