BlockTrackerMarketplaces
    Updated 2024-09-10
    with traders as (
    select
    date_trunc('day', block_timestamp) as date,
    platform_name,
    count(DISTINCT trader) as n_traders
    from
    (
    select
    block_timestamp,
    platform_name,
    seller_address as trader
    from aptos.nft.ez_nft_sales
    union all
    select
    block_timestamp,
    platform_name,
    buyer_address as trader
    from aptos.nft.ez_nft_sales
    )
    where date >= current_date - 30
    group by 1 , 2
    ),
    prices as (
    select
    date_trunc('hour', hour) as date,
    median(price) as price
    from aptos.price.ez_prices_hourly
    where symbol = 'APT'
    and date >= current_date - 30
    group by 1
    ),
    main as (
    select
    block_timestamp,
    tx_hash,
    QueryRunArchived: QueryRun has been archived