Elprognerd3 daily eth h
Updated 2022-12-09
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
32
33
34
35
36
›
⌄
⌄
select
date_trunc('day', block_timestamp) as date,
CASE WHEN date >= '2022-11-11' then 'After FTX Hack'
when date <= '2022-11-11' then 'Before FTX Hack' END AS ERA,
'Ethereum' as network,
count(distinct tx_hash) as n_swaps,
count(distinct Origin_from_address) as n_users,
count(distinct contract_address) as n_pools,
sum(n_swaps) over (order by date) as n_cumulative_swap,
sum(n_users) over (order by date) as n_cumulative_swappers
from ethereum.core.fact_event_logs
where origin_to_address = '0xdef171fe48cf0115b1d80b88dc8eab59176fee57'
and event_name = 'Swap'
and block_timestamp >= CURRENT_DATE - 90
group by 1, 2
ORDER BY 1
/*
UNION ALL
select
date_trunc('day', block_timestamp) as date,
'Arbitrum' as network,
count(distinct tx_hash) as n_swaps,
count(distinct Origin_from_address) as n_users,
count(distinct contract_address) as n_pools,
sum(n_swaps) over (order by date) as n_cumulative_swap,
sum(n_users) over (order by date) as n_cumulative_swappers
from arbitrum.core.fact_event_logs
where origin_to_address = '0xdef171fe48cf0115b1d80b88dc8eab59176fee57'
and event_name = 'Swap'
and tx_status = 'SUCCESS'
and block_timestamp >= CURRENT_DATE - 90
group by 1, 2
UNION ALL
Run a query to Download Data