maybeyonasparaswap_daily_new
Updated 2022-05-08
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
›
⌄
with paraswap as (
select distinct * from (
select
date(block_timestamp) as date,
tx_hash as tx_id,
from_address as origin_address
-- case when to_address = lower('0xdef171fe48cf0115b1d80b88dc8eab59176fee57') then from_address as user else
from ethereum_core.fact_transactions
where to_address = lower('0xdef171fe48cf0115b1d80b88dc8eab59176fee57') -- or from_address = lower('0xdef171fe48cf0115b1d80b88dc8eab59176fee57')
)
),
first_date as (
select
origin_address,
min(date) as date
from paraswap
group by 1
)
select
date,
count(distinct origin_address) as new_users
from first_date
where date > current_date - interval '60 days'
group by 1
Run a query to Download Data