ramishoowUntitled Query
Updated 2023-01-05
9
1
2
3
4
5
6
7
8
›
⌄
with ramishoow as (select distinct message_value:contract as "Contract Address", date_trunc('w',t1.block_timestamp) as "time", count(distinct tx_sender) as "Users Deployed"
--with ramishoow as (select distinct message_value:contract as "Contract Address", date_trunc('w',t1.block_timestamp) as "time", count(distinct tx_sender) as "Users Deployed"
from terra.core.ez_messages t1 join terra.core.fact_transactions t2 on t1.tx_id=t2.tx_id where message_type like '%Contract%' group by 1,2 ) select "time", case
when "Users Deployed" = 0 then '0 Senders Interacted' when "Users Deployed" between 1 and 10 then 'a 1 to 10 Senders Interacted'
when "Users Deployed" between 11 and 50 then 'b 11 to 50 Senders Interacted' when "Users Deployed" between 51 and 100 then 'c 51 to 100 Senders Interacted'
when "Users Deployed" between 101 and 500 then 'd 101 to 500 Senders Interacted' when "Users Deployed" between 501 and 1000 then 'e 501 to 1,000 Senders Interacted'
when "Users Deployed" between 1001 and 5000 then 'f 1,001 to 5,000 Senders Interacted' when "Users Deployed" between 5001 and 10000 then 'g 5,001 to 10,000 Senders Interacted'
else 'h More than 10,001 Senders Interacted' end as "Type", count(distinct "Contract Address") as "Contracts Deployed" from ramishoow group by 1,2 --ramishoow
Run a query to Download Data