KuramaTB - Successful Bids on Kujira - Total bids bLUNA aUST
    Updated 2022-04-14
    with retracted_aust as (select f.value as retracted_id_aust
    from terra.msgs

    left join table(flatten(input => msg_value:execute_msg:retract_bids:bids_idx)) f
    where block_timestamp >= '2021-11-11'
    and msg_value:contract = 'terra13nk2cjepdzzwfqy740pxzpe3x75pd6g0grxm2z'
    and msg_value:execute_msg:retract_bids is not null
    and tx_status = 'SUCCEEDED'
    group by 1),

    retracted_ust as (select f.value as retracted_id_ust
    from terra.msgs

    left join table(flatten(input => msg_value:execute_msg:retract_bids:bids_idx)) f
    where block_timestamp >= '2021-11-11'
    and msg_value:contract = 'terra1e25zllgag7j9xsun3me4stnye2pcg66234je3u'
    and msg_value:execute_msg:retract_bids is not null
    and tx_status = 'SUCCEEDED'
    group by 1),

    activated_aust as (select f.value as activated_id_aust
    from terra.msgs

    left join table(flatten(input => msg_value:execute_msg:activate_bids:bids_idx)) f
    where block_timestamp >= '2021-11-11'
    and msg_value:contract = 'terra13nk2cjepdzzwfqy740pxzpe3x75pd6g0grxm2z'
    and msg_value:execute_msg:activate_bids is not null
    and tx_status = 'SUCCEEDED'
    and msg_value:execute_msg:activate_bids:collateral_token = 'terra1kc87mu460fwkqte29rquh4hc20m54fxwtsx7gp'
    group by 1),

    activated_ust as (select f.value as activated_id_ust
    from terra.msgs

    left join table(flatten(input => msg_value:execute_msg:activate_bids:bids_idx)) f
    where block_timestamp >= '2021-11-11'
    Run a query to Download Data