-- forked from d66f93da-11da-49b8-b0d6-ed30c5a384ec
-- forked from b319193e-fd53-47a5-877f-957945c05ff2
with
all_tx as (
select
block_timestamp,
from_address,
to_address,
symbol,
amount,
amount_usd,
token_price,
contract_address,
tx_hash
from
ethereum.core.ez_token_transfers
where
from_address = '0xb9e5cbb9ca5b0d659238807e84d0176930753d86'
),
labels as (
select
*,
case
when to_address = lower('
end as Guild
from
all_tx
)
select
Guild,
sum(amount_usd) as "Total Funding ($)",
sum(amount) as "Total BANK"
from
labels