binhachonWhale Dependency Index - Test query
    Updated 2022-01-25
    with liquidity_share as (
    select
    tx_id,
    block_timestamp,
    event_attributes:receiver::string as receiver,
    event_attributes:share::float/1e6 as share
    from terra.msg_events
    where tx_status = 'SUCCEEDED'
    and event_type = 'from_contract'
    and event_attributes:"1_action"::string = 'mint'
    and event_attributes:"1_contract_address"::string = 'terra1t599xaj0lyyyjza86uskcqdy9aqy2txzdezyln'
    union all
    select
    tx_id,
    block_timestamp,
    event_attributes:sender::string as sender,
    -event_attributes:withdrawn_share::float/1e6 as share
    from terra.msg_events
    where tx_status = 'SUCCEEDED'
    and event_type = 'from_contract'
    and event_attributes:"2_action"::string = 'burn'
    and event_attributes:"2_contract_address"::string = 'terra1t599xaj0lyyyjza86uskcqdy9aqy2txzdezyln'
    )
    select sum(share) from liquidity_share



    Run a query to Download Data