Afonso_DiazUntitled Query
Updated 2023-01-25
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
with t as (
select a.attribute_value as contract,
min(block_timestamp) as min_date
from terra.core.fact_msg_attributes a
left join terra.core.dim_address_labels b
on a.attribute_value = b.address
where a.attribute_key in ('contract', 'contract_address', '_contract_address', 'contract_addr', 'contract_name')
group by contract
)
select
iff(min_date >= '2023-01-14', 'After Announcement', 'Before Announcement') as timespan,
count(distinct contract) as new_contracts_count
from t
where min_date between date('2023-01-14') - interval '1 week' and date('2023-01-14') + interval '1 week'
group by 1
Run a query to Download Data