shadilSuccessful Bids on Kujira - filled(claimed) bids portion
    Updated 2022-04-11
    -- kujira
    -- Old contract https://finder.terra.money/columbus-4/address/terra1w9ky73v4g7v98zzdqpqgf3kjmusnx4d4mvnac6
    -- New contract https://finder.terra.money/columbus-5/address/terra1e25zllgag7j9xsun3me4stnye2pcg66234je3u

    with claimed_bids as (
    select
    count(f.value) as claimed_id_count
    from terra.msgs

    left join table(flatten(input => msg_value:execute_msg:claim_liquidations:bids_idx)) f
    where date(block_timestamp) >= '2021-11-11' -- inception date
    and msg_value:contract = 'terra1e25zllgag7j9xsun3me4stnye2pcg66234je3u'
    and msg_value:execute_msg:claim_liquidations is not null
    and tx_status = 'SUCCEEDED'
    ),
    activated_bids as (
    select count(*) as activated_bids_count
    from terra.msgs
    where (msg_value:contract = 'terra1e25zllgag7j9xsun3me4stnye2pcg66234je3u' or msg_value:contract = 'terra1w9ky73v4g7v98zzdqpqgf3kjmusnx4d4mvnac6')
    and msg_type = 'wasm/MsgExecuteContract'
    and msg_value:execute_msg:submit_bid is not NULL
    and tx_status = 'SUCCEEDED'
    and date(block_timestamp) >= '2021-11-11' -- inception date
    )

    SELECT
    c.claimed_id_count,
    a.activated_bids_count,
    (c.claimed_id_count / a.activated_bids_count) * 100 as filled_percent
    from claimed_bids c
    join activated_bids a
    Run a query to Download Data