KaskoazulTinyman TVL by asset 2.0
    Updated 2022-06-24
    with raw_txs_out as (
    select tf.block_timestamp,
    tf.tx_id,
    l.address as pool_address,
    l.address_name as pool_name,
    tf.asset_id,
    --concat_ws(' - ', pool_address, asset_id) as asset_in_pool,
    tf.amount
    from flipside_prod_db.algorand.transfers tf
    left join flipside_prod_db.algorand.labels l
    on l.address = tf.asset_sender
    where l.label = 'tinyman' -- Tinyman DEX
    --and l.address_name in ('tinyman: goBTC-ALGO pool','tinyman: USDC-Tether USDt pool','tinyman: USDC-ALGO pool','tinyman: goETH-ALGO pool','tinyman: Yieldly-ALGO pool',
    --'tinyman: Chips-ALGO pool','tinyman: Cosmic Champs-ALGO pool','tinyman: gem-ALGO pool')
    order by 1 desc
    ),

    raw_txs_in as (
    select tf.block_timestamp,
    tf.tx_id,
    l.address as pool_address,
    l.address_name as pool_name,
    tf.asset_id,
    --concat_ws('-', pool_address, asset_id) as asset_in_pool,
    tf.amount
    from flipside_prod_db.algorand.transfers tf
    left join flipside_prod_db.algorand.labels l
    on l.address = tf.receiver
    where l.label = 'tinyman' -- Tinyman DEX
    --and l.address_name in ('tinyman: goBTC-ALGO pool','tinyman: USDC-Tether USDt pool','tinyman: USDC-ALGO pool','tinyman: goETH-ALGO pool','tinyman: Yieldly-ALGO pool',
    -- 'tinyman: Chips-ALGO pool','tinyman: Cosmic Champs-ALGO pool','tinyman: gem-ALGO pool')
    order by 1 desc
    ),

    price_day as (
    select block_hour::date as fecha,
    Run a query to Download Data