NuveveCryptoArchivedAverage Gas Usage By Transaction Type
    Updated 2023-03-04
    with dex_swaps as (
    select
    concat('dex_swaps') as tx_type,
    sum(transactions.tx_fee)/count(swaps.tx_hash) as gas_eth
    from ethereum.core.ez_dex_swaps as swaps
    inner join ethereum.core.fact_transactions as transactions on swaps.tx_hash = transactions.tx_hash
    ),

    eth_transfers as (
    select
    concat('eth_transfers') as tx_type,
    sum(transactions.tx_fee)/count(transfers.tx_hash) as gas_eth
    from ethereum.core.ez_eth_transfers as transfers
    inner join ethereum.core.fact_transactions as transactions on transfers.tx_hash = transactions.tx_hash
    ),

    nft_mints as (
    select
    concat('nft_mints') as tx_type,
    sum(transactions.tx_fee)/count(mints.tx_hash) as gas_eth
    from ethereum.core.ez_nft_mints as mints
    inner join ethereum.core.fact_transactions as transactions on mints.tx_hash = transactions.tx_hash
    ),

    nft_sales as (
    select
    concat('nft_sales') as tx_type,
    sum(transactions.tx_fee)/count(sales.tx_hash) as gas_eth
    from ethereum.core.ez_nft_sales as sales
    inner join ethereum.core.fact_transactions as transactions on sales.tx_hash = transactions.tx_hash
    ),

    nft_transfers as (
    select
    concat('nft_transfers') as tx_type,
    sum(transactions.tx_fee)/count(transfers.tx_hash) as gas_eth
    Run a query to Download Data