0xHaM-dUntitled Query
Updated 2022-12-21
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with first_date_contract as (
select
tx:body:messages[0]:contract as new_dep_contracts,
min(block_timestamp) as min_date,
count(distinct tx_id) as transactions,
count(distinct tx_sender) as users
from terra.core.dim_address_labels join terra.core.fact_transactions on address=tx:body:messages[0]:contract
group by 1
)
select
project_name,
count(distinct tx_id) as tx_cnt,
count(distinct tx_sender) as usr_cnt
from terra.core.dim_address_labels join terra.core.fact_transactions on address = tx:body:messages[0]:contract
WHERE tx:body:messages[0]:contract in (SELECT new_dep_contracts from first_date_contract)
AND block_timestamp::date >= CURRENT_DATE-INTERVAL '{{Past_Days}} DAY'
group by 1
order by 2 DESC
limit 10
Run a query to Download Data