0xHaM-dNew Users
Updated 2023-01-26
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
›
⌄
with table1 as (
select
trader,
min(block_timestamp) as Mindate
from osmosis.core.fact_swaps
where from_currency = 'ibc/0954E1C28EB7AF5B72D24F3BC2B47BBB2FDF91BDDFD57B74B99E133AED40972A'
and TX_SUCCEEDED = TRUE
group by 1),
table2 as (
select trader,
min (block_timestamp) as Mindate
from osmosis.core.fact_swaps
where to_currency = 'ibc/0954E1C28EB7AF5B72D24F3BC2B47BBB2FDF91BDDFD57B74B99E133AED40972A'
and TX_SUCCEEDED = TRUE
group by 1)
select
'Swap From SCRT' as swap_type,
mindate::date as date,
count (distinct trader) as New_Users,
sum (new_users) over (order by date) as Total_Users
from table1
group by 1,2
union ALL
select 'Swap to SCRT' as swap_type,
mindate::date as date,
count (distinct trader) as New_Users,
sum (new_users) over (order by date) as Total_Users
from table2
group by 1,2
Run a query to Download Data