Delete Untitled-2

This commit is contained in:
Jack Forgash 2025-05-14 12:03:03 -06:00 committed by GitHub
parent d054e7bd99
commit 894ee6fad0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
;