Updated 2021-08-31
    WITH prices as(
    SELECT
    currency,
    symbol
    FROM terra.oracle_prices
    WHERE block_timestamp >= CURRENT_DATE - 7
    GROUP BY 1,2
    )
    SELECT
    msg_value:sender::string as sender,
    'provide_liquidity' as action,
    sum(msg_value:execute_msg:provide_liquidity:assets[0]:amount / POW(10,6)) as token_0_amount,
    msg_value:execute_msg:provide_liquidity:assets[0]:info:token:contract_addr::string as token_0_address,
    t0.address_name as token_0_address_name,
    sum(msg_value:execute_msg:provide_liquidity:assets[1]:amount / POW(10,6)) as token_1_amount,
    (token_1_amount * 2) as total_provided,
    msg_value:execute_msg:provide_liquidity:assets[1]:info:native_token:denom::string as token_1_address,
    t1.symbol as token_1_address_name,
    msg_value:contract::string as contract_address,
    c.address_name as contract_label
    FROM terra.msgs m

    LEFT OUTER JOIN terra.labels t0
    ON msg_value:execute_msg:provide_liquidity:assets[0]:info:token:contract_addr = t0.address
    LEFT OUTER JOIN prices t1
    ON msg_value:execute_msg:provide_liquidity:assets[1]:info:native_token:denom::string = t1.currency

    LEFT OUTER JOIN terra.labels c
    ON msg_value:contract = c.address
    WHERE msg_value:contract = 'terra1gm5p3ner9x9xpwugn9sp6gvhd0lwrtkyrecdn3' --ANC UST POOL
    AND msg_value:execute_msg:provide_liquidity IS NOT NULL
    group by 1,2,4,5,8,9,10,11
    order by 6 desc
    Run a query to Download Data