nickpAggregate all time
    Updated 2024-06-21
    /*
    select * FROM osmosis.price.ez_prices where lower(currency) = 'strd' limit 10
    ukuji
    -- transfer/channel-122/inj
    */


    -- Leaving Osmosis
    with leaving_osmosis as(
    select
    sp.block_timestamp,
    sp.block_id,
    sp.tx_id,
    tx_from,
    LEFT(msg_group, POSITION(':' IN msg_group) - 1) as msg_group_ref,
    TRY_PARSE_JSON(sp.attribute_value):denom::STRING AS receive_denom,
    TRY_PARSE_JSON(sp.attribute_value):amount::STRING AS receive_raw_amount,
    TRY_PARSE_JSON(sp.attribute_value):sender::STRING AS sender,
    TRY_PARSE_JSON(sp.attribute_value):receiver::STRING AS receiver,
    CASE
    WHEN receiver LIKE 'acre%' THEN 'acre'
    WHEN receiver LIKE 'archway%' THEN 'archway'
    WHEN receiver LIKE 'agoric%' THEN 'agoric'
    WHEN receiver LIKE 'akash%' THEN 'akash'
    WHEN receiver LIKE 'assetmantle%' THEN 'assetmantle'
    WHEN receiver LIKE 'axelar%' THEN 'axelar'
    WHEN receiver LIKE 'band%' THEN 'band'
    WHEN receiver LIKE 'bcna%' THEN 'bitcanna'
    WHEN receiver LIKE 'bitsong%' THEN 'bitsong'
    WHEN receiver LIKE 'bostrom%' THEN 'bostrom'
    WHEN receiver LIKE 'carbon%' THEN 'carbon'
    WHEN receiver LIKE 'centauri%' THEN 'centauri'
    WHEN receiver LIKE 'cheqd%' THEN 'cheqd'
    WHEN receiver LIKE 'chihuahua%' THEN 'chihuahua'
    WHEN receiver LIKE 'comdex%' THEN 'comdex'
    WHEN receiver LIKE 'cosmos%' THEN 'cosmoshub'
    QueryRunArchived: QueryRun has been archived