binhachonCopy of Whale Dependency Index
    Updated 2022-01-25
    with loop_create_pair_transactions as (
    select
    tx_id
    from terra.msgs
    where tx_status = 'SUCCEEDED'
    and msg_value:execute_msg:create_pair is not null
    and msg_value:sender::string = 'terra1l4smc62umdn2yjh202m2e8pgas2gx400a0l5hv' --Loop Instantiator
    ),
    loop_pair_addresses as (
    select
    event_attributes:"0_liquidity_token_addr"::string as uLP_token,
    event_attributes:"pair_contract_addr"::string as LP_pair
    from terra.msg_events
    where tx_id in (select tx_id from loop_create_pair_transactions)
    and uLP_token is not null
    and event_type = 'from_contract'
    )
    select
    *
    from terra.daily_balances
    where address = 'terra1a26j00ywq0llvms707hqycwlkl9erwhacr6jve'
    Run a query to Download Data