shadilIL Insurance
    Updated 2022-04-09
    with all_remove as (
    SELECT
    count(DISTINCT from_address) as count_users
    from thorchain.liquidity_actions
    where lp_action = 'remove_liquidity'
    ),
    receiving_il as (
    SELECT
    count(DISTINCT from_address) as count_users
    from thorchain.liquidity_actions
    where lp_action = 'remove_liquidity'
    and il_protection > 0
    and il_protection is not NULL
    )

    SELECT
    (r_il.count_users/al.count_users) * 100 as portion
    from all_remove al
    join receiving_il r_il
    Run a query to Download Data