adriaparcerisasterra contracts 2
Updated 2022-12-20
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
-- Construct a dashboard that displays the number of new contracts deployed
-- and the total number of contracts deployed each week over the past several months.
-- Your dashboard should also chart the development of stablecoins, including any supply trends.
with tab1 as (
select
--distinct tx:body:messages[0]:contract as contract,
project_name,--label_type,
min(block_timestamp) as debut,
count(distinct tx_id) as transactions,
count(distinct tx_sender) as users
--from terra.core.fact_msg_attributes x
from terra.core.dim_address_labels y
join terra.core.fact_transactions z on address=tx:body:messages[0]:contract
--where ATTRIBUTE_KEY in ('contract','u_contract_address','contract_name',
--'contract_version','contract_addr','contract_address','dao_contract_address','pair_contract_addr','nft_contract')
--and attribute_value not in ('terra1muhks8yr47lwe370wf65xg5dmyykrawqpkljfm39xhkwhf4r7jps0gwl4l','terra1j8hayvehh3yy02c2vtw5fdhz9f4drhtee8p5n5rguvg3nyd6m83qd2y90a','terra1nsuqsk6kh58ulczatwev87ttq2z6r3pusulg9r24mfj2fvtzd4uq3exn26') --avoiding several Astroport contracts
group by 1
)
SELECT
*
from tab1 where debut>=CURRENT_DATE-INTERVAL '{{n_months}} MONTHS'
order by 2 asc,3 desc
Run a query to Download Data