maybeyonasgas fees
    Updated 2021-08-17
    with transactions as (
    select
    date(block_timestamp) as time,
    tx_id,
    fee[0]:amount as fee,
    fee[0]:denom as denom,
    gas_used,
    fee as fee_arr
    from terra.transactions
    ),
    price as (
    select
    date(block_timestamp) as time,
    currency,
    luna_exchange_rate,
    price_usd
    from terra.oracle_prices
    ),
    hourly_price as (
    select
    time,
    currency,
    avg(luna_exchange_rate) as luna_rate,
    avg(price_usd) as usd_rate
    from price
    group by time,currency
    ),
    transactionFees as(
    select -- *
    t.time,
    fee/1000000,
    denom,
    gas_used/1000000 as gas,
    h.currency as currency,
    luna_rate,
    usd_rate
    Run a query to Download Data