0xHaM-dNFT Sales Over Time
    Updated 1 day ago
    with priceTb as (
    SELECT
    HOUR::date as p_date,
    avg(price) as avg_price
    FROM aptos.price.ez_prices_hourly
    WHERE SYMBOL = 'APT'
    GROUP by 1
    )
    SELECT
    date_trunc({{period_type}}, BLOCK_TIMESTAMP)::date as date,
    count(DISTINCT TX_HASH) as n_sales,
    count(DISTINCT BUYER_ADDRESS) as n_buyers,
    count(DISTINCT SELLER_ADDRESS) as n_sellers,
    count(DISTINCT NFT_ADDRESS) as n_tokens,
    sum(PLATFORM_FEE) as PLATFORM_FEEs,
    sum(PLATFORM_FEE*avg_price) as PLATFORM_FEE_USD,
    sum(CREATOR_FEE) as CREATOR_FEEs,
    sum(CREATOR_FEE*avg_price) as CREATOR_FEE_USD,
    avg(TOTAL_PRICE) as AVG_PRICE,
    sum(TOTAL_PRICE) as sales_vol_apt,
    avg(TOTAL_PRICE*avg_price) as AVG_PRICE_USD,
    sum(TOTAL_PRICE*avg_price) as sales_vol_usd,
    sum(n_sales) over (order by date) as cum_n_sales,
    sum(sales_vol_apt) over (order by date) as cum_sales_vol_apt,
    sum(sales_vol_usd) over (order by date) as cum_sales_vol_usd,
    sum(PLATFORM_FEEs) over (order by date) as cum_PLATFORM_FEE,
    sum(CREATOR_FEEs) over (order by date) as cum_CREATOR_FEE
    FROM aptos.nft.ez_nft_sales
    JOIN priceTb on date_trunc('d', BLOCK_TIMESTAMP)::date = p_date
    WHERE BLOCK_TIMESTAMP::date>='{{start_day}}' and date_trunc({{period_type}}, BLOCK_TIMESTAMP)<='{{target_day}}'
    AND BLOCK_TIMESTAMP::date < date_trunc({{period_type}}, current_date())
    GROUP by 1
    ORDER by 1 DESC



    Last run: 1 day ago
    DATE
    N_SALES
    N_BUYERS
    N_SELLERS
    N_TOKENS
    PLATFORM_FEES
    PLATFORM_FEE_USD
    CREATOR_FEES
    CREATOR_FEE_USD
    AVG_PRICE
    SALES_VOL_APT
    AVG_PRICE_USD
    SALES_VOL_USD
    CUM_N_SALES
    CUM_SALES_VOL_APT
    CUM_SALES_VOL_USD
    CUM_PLATFORM_FEE
    CUM_CREATOR_FEE
    1
    2025-06-09 00:00:00.00049088058963229816.75529763870.0488943172123.2313123710056.4753500598.68562875151531.8353770841.109966303243905.430073191819049859485.459134397855439.8642425832861.9915094527752.25764017
    2
    2025-06-02 00:00:00.00037307468052311524.725079952499.6176380591337.79412216374.580771237.17935520732127.6145520634.194711918153021.335833762814141807953.623757317611534.4341693932045.2362118525629.0263278
    3
    2025-05-26 00:00:00.00040607918222407565.820994342890.9538861452.046412147401.6621595276.42701233532662.07668732.732258434166345.337359172810411775826.009205257458513.0983356331520.511131924291.2322057
    4
    2025-05-19 00:00:00.00030088007792739323.307956971723.493258529769.494483944107.1124041843.81767421717431.5004741120.3883795993093.341207787806351743163.932518257292167.7609764630954.6901375622839.18579356
    5
    2025-05-12 00:00:00.00025977667902307130.40667397717.717448037290.935011711590.9465678361.9582403326665.8500913110.67936089136352.544472916803343725732.432044147199074.4197686730631.3821805922069.69130962
    6
    2025-05-05 00:00:00.000894549468271051.68195862283.21773982696.82727777535.0834758350.72717002862053.528160854.01488108111338.024171722800746719066.581952837162721.8752957530500.9755066221778.75629791
    7
    2025-04-28 00:00:00.000691288295132520.81628223112.41037660537.68648925203.452611140.6156589592859.459907093.3202869184635.120536966799852717013.053791987151383.8511240330449.29354821681.92902014
    8
    2025-04-21 00:00:00.000877359424153541.09667715216.80630388474.74618418394.9298924390.9660803171561.18579235.0867418978220.174906219799161716153.593884897146748.7305870730428.4772657721644.24253089
    9
    2025-04-14 00:00:00.0001295462594692071.38897954341.061916957165.06081825788.6654707310.50212980833536.500240042.39917762116897.407984349798284714592.408092597138528.5556808530387.3805886221569.49634671
    10
    2025-04-07 00:00:00.000769344319367432.90588755151.26717855859.54488254276.0723939030.34924613671296.401659331.6179558356005.852058724796989711055.907852557121631.147696530315.9916090821404.43552846
    11
    2025-03-31 00:00:00.0001126395459297275.40040955382.727549398131.73920554676.8933513410.86739242732677.640423134.42113357313648.03933876796220709759.506193227115625.2956377730283.0857215321344.89064592
    12
    2025-03-24 00:00:00.00020117187333477219.081587451291.370124226358.510449032114.2544701451.527074656135.785941728.99306810936134.147663008795094707081.865770097101977.2562990130207.6853119821213.15144038
    13
    2025-03-17 00:00:00.0001263602500192091.82035938509.148980672148.98225244828.6449469411.3104530482700.843731637.27374220214991.18267928793083700946.079828377065843.1086360129988.6037245320854.64099135
    14
    2025-03-10 00:00:00.0001395610495152940.82666558216.36112963776.10444752403.5007383820.69302619621240.516891133.6624633986555.809483103791820698245.236096747050851.9259567329896.7833651520705.65873891
    15
    2025-03-03 00:00:00.0001953882648231366.69795064401.560008828121.57638882722.9233486330.74269409212005.274048744.47334069812078.019884968790425697004.719205617044296.1164736229855.9566995720629.55429139
    16
    2025-02-24 00:00:00.000999528454136178.05427284470.62606236388.93700923532.684419121.5605149012279.912270019.35221861713663.591399965788472694999.445156877032218.0965886629789.2587489320507.97790257
    17
    2025-02-17 00:00:00.00071129328491881.41446369494.74909888199.06434379602.7200827992.6765196732657.7840353216.27195649316158.052797565787473692719.532886867018554.5051886929711.2044760920419.04089334
    18
    2025-02-10 00:00:00.000738366320126091.30441246556.227612011160.90790184982.4472348872.9568365573882.3263999418.0444427723692.353357491786762690061.748851547002396.4523911329629.790012420319.97654955
    19
    2025-02-03 00:00:00.0007533593511122167.62405758992.876339061227.52361111345.028604185.0424846786252.6810003829.80485605636958.021509661786024686179.42245166978704.0990336429538.4855999420159.06864771
    20
    2025-01-27 00:00:00.00010824244001262101.69405036755.423739499125.99338292941.2114588693.0359076134165.2652457222.70240979831147.706242533785271679926.741451226941746.0775239729370.8615423619931.54503661
    76
    17KB
    8s