hasan-_Untitled Query
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
›
⌄
with lst_tx as (
select
FROM_ADDRESS as wallet
,min(block_timestamp::date) as day
from gnosis.core.fact_transactions
where block_timestamp::date>=CURRENT_DATE-90
and status='SUCCESS'
group by 1
)
,lst_check as (
select
TO_ADDRESS
,count(DISTINCT tx_id) as tx_count
from gnosis.core.fact_transactions
where block_timestamp::date>=CURRENT_DATE-90
and status='SUCCESS'
group by 1
having tx_count>=1
)
,lst_check_two as (
select
to_address as wallet
,min(block_timestamp::date) as day
from gnosis.core.fact_transactions
where block_timestamp::date>=CURRENT_DATE-90
and to_address in(select lst_check.to_address from lst_check)
and status='SUCCESS'
group by 1
)
,lst_all as (
select day,wallet from lst_tx
union all
select day,wallet from lst_check_two
)
Run a query to Download Data