Skip to content

Commit ee6a891

Browse files
committed
Add a test
1 parent 799e4fa commit ee6a891

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-- Refunds have a negative amount, so the total amount should always be >= 0.
2+
-- Therefore return records where this isn't true to make the test fail
3+
select
4+
order_id,
5+
sum(amount_usd) as total_amount
6+
from {{ ref('stg_payments' )}}
7+
group by 1
8+
having not(sum(amount_usd) >= 0)

0 commit comments

Comments
 (0)