daniel1234567QA1 — Daily Time Series, Categories
    Updated 2022-12-06
    /* Test Query 1 — Time Series, Daily, Categorical (12) */

    with big_spendas as (
    select
    ORIGIN_FROM_ADDRESS as from_address,
    sum(total_fees_usd) as fee_total
    from ethereum.core.ez_nft_sales
    where date_trunc('day',block_timestamp) > current_date - interval '90 days'
    and total_fees_usd is not null
    group by 1 order by 2 desc
    limit 12
    )

    SELECT
    date_trunc ('day', block_timestamp) as date,
    from_address,
    sum(tx_fee) as tx_fees,
    sum(gas_used) as gas_used,
    avg(gas_price) as gas_price,
    avg(eth_value) as eth_value
    FROM ethereum.core.fact_transactions
    where
    from_address in (select from_address from big_spendas)
    and date_trunc('day',block_timestamp) > current_date - interval '365 days'
    group by 1,2


    -- select
    -- from_address,
    -- sum(gas_used) as gas_total
    -- from ethereum.core.fact_transactions
    -- where date_trunc('day',block_timestamp) > current_date - interval '365 days'
    -- group by 1 order by 2 desc
    -- limit 20


    Run a query to Download Data