maybeyonasthor_synth_mint
    Updated 2022-04-11
    with
    mints as (
    select
    block_timestamp,
    'mint' as event,
    tx_id,
    split(pool_name,'-')[0]::string as asset,
    to_amount as amt_minted,
    to_amount_usd as amt_minted_usd
    from thorchain.swaps
    where to_asset like '%%/%%'
    ),
    burns as (
    select
    block_timestamp,
    'burn' as event,
    tx_id,
    split(pool_name,'-')[0]::string as asset,
    from_amount as amt_minted,
    from_amount_usd as amt_minted_usd
    from thorchain.swaps
    where from_asset like '%%/%%'
    )

    select
    date(block_timestamp) as date,
    asset,
    count(distinct tx_id) as txs,
    sum(amt_minted_usd) as total_mint_vol
    from mints
    group by 1,2

    Run a query to Download Data