shadilNet Synth Amounts - Net Synth(mints - burns) tolerance in 2022
    Updated 2022-04-29
    with mints as (
    SELECT date(block_timestamp) as date,
    split(pool_name, '.')[1] as pool_name_tmp,
    split(pool_name_tmp, '-')[0] as pool_name_part,
    split(pool_name, '.')[0] as network,
    concat(pool_name_part, ' - ', network) as pool_name,
    count(DISTINCT tx_id) as counter,
    sum(from_amount_usd) as volume
    from thorchain.swaps sw
    where to_asset like '%/%'
    and date(block_timestamp) >= '2022-01-01'
    GROUP by date, pool_name
    ),
    burns as (
    SELECT date(block_timestamp) as date,
    split(pool_name, '.')[1] as pool_name_tmp,
    split(pool_name_tmp, '-')[0] as pool_name_part,
    split(pool_name, '.')[0] as network,
    concat(pool_name_part, ' - ', network) as pool_name,
    count(DISTINCT tx_id) as counter,
    sum(from_amount_usd) * -1 as volume
    from thorchain.swaps sw
    where from_asset like '%/%'
    and date(block_timestamp) >= '2022-01-01'
    GROUP by date, pool_name
    )

    SELECT
    date,
    pool_name,
    sum(counter) as counter,
    sum(volume) as volume
    from (
    SELECT * from mints
    UNION
    SELECT * from burns
    Run a query to Download Data