Moeswapper new users
Updated 2023-08-28
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
MAINTAB as
(select
BLOCK_TIMESTAMP ,
tx_id from
sei.core.fact_msg_attributes
where
MSG_TYPE = 'wasm'
and
ATTRIBUTE_KEY = 'action'
and
ATTRIBUTE_VALUE = 'swap' )
, tb2 as (
select
block_timestamp ,
tx_id ,
ATTRIBUTE_VALUE as swapper ,
row_number()over(partition by ATTRIBUTE_VALUE order by block_timestamp::date desc ) as n
from
sei.core.fact_msg_attributes
where
MSG_TYPE = 'wasm'
and tx_id in (select tx_id from maintab)
and
ATTRIBUTE_KEY = 'sender'
)
select
block_timestamp::date ,
case when n = 1 then 'new user' else 'older user' end as type ,
count(distinct swapper) as users
from
Run a query to Download Data