Ali3NAverage Blast vs Avalanche Users Stats
    Updated 2024-07-08
    with ethpricet as (
    SELECT hour::date as day,
    avg (price) as ethprice
    from ethereum.price.ez_prices_hourly
    where token_address = lower ('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2')
    and hour >='{{Start_Date}}' and hour <= '{{End_Date}}'
    group by 1),

    avaxpricet as (
    SELECT hour::date as day,
    avg (price) as avaxprice
    from avalanche.price.ez_prices_hourly
    where symbol ilike 'WAVAX'
    and hour >='{{Start_Date}}' and hour <= '{{End_Date}}'
    group by 1),

    userst as (
    select 'Blast' as network,
    from_address as "Wallet Address",
    count (Distinct tx_hash) as "Transactions",
    count (Distinct block_timestamp::date) as "Active Days",
    sum (tx_fee*ethprice) as "Paid Fees [USD]"
    from blast.core.fact_transactions t1 join ethpricet t2 on date_Trunc (day,block_timestamp) = t2.day
    where block_timestamp >= '{{Start_Date}}' and block_timestamp <= '{{End_Date}}'
    group by 1,2

    union all

    select 'Avalanche' as network,
    from_address as "Wallet Address",
    count (Distinct tx_hash) as "Transactions",
    count (Distinct block_timestamp::date) as "Active Days",
    sum (tx_fee*avaxprice) as "Paid Fees [USD]"
    from avalanche.core.fact_transactions t1 join avaxpricet t2 on date_Trunc (day,block_timestamp) = t2.day
    where block_timestamp >= '{{Start_Date}}' and block_timestamp <= '{{End_Date}}'
    group by 1,2)
    Auto-refreshes every 24 hours
    QueryRunArchived: QueryRun has been archived