binhachonSynth Mints + Burns - Aggregate
    Updated 2022-04-08
    with burning_transaction as (
    select
    block_timestamp,
    from_asset,
    to_amount
    from thorchain.swaps
    where from_asset like '%/%'
    ),
    rune_price as (
    select
    date_trunc('day', block_timestamp) as time,
    sum(to_amount)/sum(from_amount) as avg_price
    from thorchain.swaps
    where from_asset = 'THOR.RUNE'
    and to_asset = 'BNB/BUSD-BD1'
    group by 1
    ),
    burn_amount as (
    select
    date_trunc('day', block_timestamp) as time,
    from_asset,
    sum(to_amount) as burn_amount
    from burning_transaction
    group by 1, 2
    ),
    minting_transaction as (
    select
    block_timestamp,
    to_asset,
    from_amount
    from thorchain.swaps
    where to_asset like '%/%'
    ),
    mint_amount as (
    select
    date_trunc('day', block_timestamp) as time,
    Run a query to Download Data