vegardTop Token inflow per hour in terms of transactions number
Updated 2022-11-10
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
›
⌄
with ftx_labels as (
select label, address
from ethereum.core.dim_labels
where (
label like any ('ftx%') or
address_name like any ('ftx%')
)
),
ftx_addresses as (
select distinct(address) as ftx_address from ftx_labels
),
outflow as (
select
date_trunc('hour', block_timestamp) as hour,
symbol,
contract_address,
count(distinct(tx_hash)) as txn_num_outflow,
sum (amount_usd) as amount_usd_outflow,
row_number() over (partition by hour order by amount_usd_outflow desc) as n
from ethereum.core.ez_token_transfers
where exists (select * from ftx_addresses where from_address = ftx_address)
and not exists (select * from ftx_addresses where to_address = ftx_address)
and amount_usd > 0
and block_timestamp >= '2022-11-06'
group by 1, 2, 3
qualify n = 1
)
select hour, symbol, contract_address , txn_num_outflow, amount_usd_outflow from outflow order by hour
Run a query to Download Data