Updated 2023-01-11Copy 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
24
25
26
›
⌄
with tab1 as (
select
min(block_timestamp) as min_date,
TX_SENDER as wallet
from terra.core.fact_transactions
where block_timestamp between '2022-12-18' and '2023-01-03'
group by 2),
tab2 as (select
date_trunc('day',block_timestamp) as date,
trader
from terra.core.ez_swaps
where FROM_CURRENCY = 'uluna'
and TX_SUCCEEDED = 'TRUE'
and date between '2022-12-18' and '2023-01-03'
and trader in (select wallet from tab1)
group by 1,2)
select
count(distinct trader), count(distinct wallet)
from tab1, tab2
Run a query to Download Data