Yousefi_1994Terra 6 - Daily Contracts deployed
Updated 2023-01-12Copy 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
27
28
29
30
31
32
33
34
›
⌄
with contracts_deployed as (
select
block_timestamp,
message_value:contract as contract_address
from terra.core.ez_messages
where message_type = '/cosmwasm.wasm.v1.MsgExecuteContract'
and message_value:contract is not null
and tx_succeeded = true
),
contracts_deployed_results_1 as (
select
contract_address,
min(block_timestamp) as deploy_time
from contracts_deployed
group by contract_address
),
contracts_deployed_results_2 as (
select
*
from contracts_deployed_results_1
where deploy_time::date >= '2022-12-12'
and deploy_time::date < '2023-01-07'
)
select
deploy_time::date as "Days",
case
when deploy_time::date >= '2022-12-12' and deploy_time::date < '2022-12-25' then 'Before Christmas Holidays'
when deploy_time::date >= '2022-12-25' and deploy_time::date < '2023-01-07' then 'Christmas Holidays'
end as "Period",
count(distinct contract_address) as "Number of Contracts Deployed"
from contracts_deployed_results_2
group by "Days", "Period"
order by "Days"
Run a query to Download Data