HosseinUntitled Query
Updated 2022-12-19
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
›
⌄
with
t1 as (
select message_value:sender as sender,
min (block_timestamp) as min_date
from terra.core.ez_messages
where tx_succeeded = 1
and message_type = '/cosmwasm.wasm.v1.MsgInstantiateContract'
group by 1
),
t2 as (
select
min_date::date as day,
count(distinct sender) as new_senders
from t1
group by 1
)
select
date_trunc('week', block_timestamp)::date as "Week",
count(distinct message_value:sender) "Senders Count",
new_senders as "New Senders",
sum("New Senders") over (order by "Week") as "Comulative New Senders Count",
sum("Senders Count") over (order by "Week") as "Comulative Senders Count"
from terra.core.ez_messages
join t2 on block_timestamp::date = day
where message_type = '/cosmwasm.wasm.v1.MsgExecuteContract'
and tx_succeeded = 1
group by 1, 3
order by 1
Run a query to Download Data