From 894ee6fad043f2ecdddfea0df03ecdccf14f3dc3 Mon Sep 17 00:00:00 2001 From: Jack Forgash <58153492+forgxyz@users.noreply.github.com> Date: Wed, 14 May 2025 12:03:03 -0600 Subject: [PATCH] Delete Untitled-2 --- Untitled-2 | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 Untitled-2 diff --git a/Untitled-2 b/Untitled-2 deleted file mode 100644 index cca0e72..0000000 --- a/Untitled-2 +++ /dev/null @@ -1,33 +0,0 @@ --- let's hone in on native NEAR balances for this user -with -user_native_transfers as ( - select - block_timestamp, - from_address, - to_address, - amount, - iff( - from_address = 'b6be88ce9708a743d073d3571ee08fa61fbbd33d84b184ce64c7d5bcc855d358', - -amount, - amount - ) as amount_signed - from near.core.ez_token_transfers -where - (from_address = 'b6be88ce9708a743d073d3571ee08fa61fbbd33d84b184ce64c7d5bcc855d358' - OR to_address = 'b6be88ce9708a743d073d3571ee08fa61fbbd33d84b184ce64c7d5bcc855d358') - and contract_address = 'wrap.near' - and transfer_type = 'native' -), -monthly_sums as ( - select - date_trunc('month', block_timestamp) as month, - sum(amount_signed) as monthly_amount - from user_native_transfers - group by month -) -select - month, - sum(monthly_amount) over (order by month) as cumulative_balance -from monthly_sums -order by month -; \ No newline at end of file