--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"
fromterra.core.ez_messagest1jointerra.core.fact_transactionst2ont1.tx_id=t2.tx_idwheremessage_typelike'%Contract%'groupby1,2)select"time", case
when"Users Deployed"=0then'0 Senders Interacted'when"Users Deployed"between1and10then'a 1 to 10 Senders Interacted'
when"Users Deployed"between11and50then'b 11 to 50 Senders Interacted'when"Users Deployed"between51and100then'c 51 to 100 Senders Interacted'
when"Users Deployed"between101and500then'd 101 to 500 Senders Interacted'when"Users Deployed"between501and1000then'e 501 to 1,000 Senders Interacted'
when"Users Deployed"between1001and5000then'f 1,001 to 5,000 Senders Interacted'when"Users Deployed"between5001and10000then'g 5,001 to 10,000 Senders Interacted'
else'h More than 10,001 Senders Interacted'endas"Type", count(distinct"Contract Address")as"Contracts Deployed"fromramishoowgroupby1,2--ramishoow