ramishoowUntitled Query
    Updated 2022-12-15
    with ramishow as ( select time, "names", count(*) as "total count", sum(VOLUME) as "sum of volume" , count(distinct value_sender) as "active senders",
    "sum of volume"/"total count" as "average count" , "sum of volume"/"active senders" as "average users" from (
    select to_date(block_timestamp) as time, MESSAGE_VALUE['sender'] as value_sender, MESSAGE_VALUE['receiver'] as value_receiver,(AMOUNT/1e6) as volume,
    case when SUBSTR(value_receiver, 0, 3) = 'sif' then 'SIF' when SUBSTR(value_receiver, 0, 4) = 'axel' then 'axelar'
    when SUBSTR(value_receiver, 0, 4) = 'grav' then 'GRAV' when SUBSTR(value_receiver, 0, 4) = 'terr' then 'terra'
    when SUBSTR(value_receiver, 0, 3) = 'cre' then 'CRE'when SUBSTR(value_receiver, 0, 4) = 'osmo' then 'osmo' when SUBSTR(value_receiver, 0, 4) = 'secr' then 'secret'
    when SUBSTR(value_receiver, 0, 4) = 'kuji' then 'kujira 'when SUBSTR(value_receiver, 0, 4) = 'cosm' then 'cosmos'
    when SUBSTR(value_receiver, 0, 4) = 'evmo' then 'evmos' when SUBSTR(value_receiver, 0, 4) = 'stri' then 'STRI'
    when SUBSTR(value_receiver, 0, 4) = 'juno' then 'juno' else null end as "names"
    from terra.core.ez_transfers where MESSAGE_TYPE='/ibc.applications.transfer.v1.MsgTransfer' and CURRENCY='uluna')
    group by time, 2 ) select * from ramishow;
    Run a query to Download Data