nsa2000Gains Network
Updated 2022-11-16Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with table_1 as (select date_trunc('day', block_timestamp) as date,
sum(event_inputs:value/1e18) as usd_volume,
sum(usd_volume) over (order by date) as cumu_usd_volume,
count(distinct(tx_hash)) as tx_count,
sum(tx_count) over (order by date) as cumu_tx_count,
count(distinct(origin_from_address)) as wallet_count,
usd_volume/tx_count as avg_vol_per_tx,
tx_count/wallet_count as avg_tx_per_wallet
from polygon.core.fact_event_logs --GNS
where tx_status= 'SUCCESS'
and contract_address = '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063'
and origin_to_address in ('0xd8d177efc926a18ee455da6f5f6a6cfcee5f8f58','0x65187fec6ecc4774c1f632c7503466d5b4353db1','0xf8a140db8b05bec52c7e86d0d40d72f8e54fe559')
and origin_from_address = event_inputs:from
and block_timestamp >= current_date - 30
group by 1)
select *,
case
when date >= '2022-11-08 00:00:00.000' then 'Collapse of FTX & Alameda'
else 'Before Collapsing'
end as event
from table_1
order by 1 desc
Run a query to Download Data