Sandeshtx_fee per million
    Updated 2022-11-16
    --reference https://app.flipsidecrypto.com/dashboard/c6TqZu

    with

    gas_algorand as (

    select

    block_timestamp,
    block_id as block_number,
    tx_id as tx_hash,
    tx_sender as spender,
    fee as fee_native,
    fee * price_usd as fee_usd,
    amount as amount_native,
    amount * price_usd as amount_usd,
    'ALGO' as token,
    price_usd,
    'Algorand' as blockchain

    from algorand.core.ez_transaction_payment txs
    left join algorand.core.ez_price_pool_balances prices
    on date_trunc('hour',txs.block_timestamp) = prices.block_hour
    where fee > 0
    and amount > 0
    and block_timestamp ::date >= current_date() - interval '1 months'
    ),

    gas_ethereum as (

    select

    block_timestamp,
    block_number,
    Run a query to Download Data