Updated 4 days ago
    select
    trunc(y.block_timestamp,'month') as date,
    y.event_data:type as asset,
    count(distinct y.tx_id) as nft_sales,
    sum(y.event_data:amount) as volume,
    sum(volume) over (order by date) as total_volume,
    avg(y.event_data:amount) as avg_nft_price
    from flow.core.fact_events x join flow.core.fact_events y on x.tx_id=y.tx_id
    where x.block_timestamp>'2024-01-01' and x.tx_succeeded='TRUE' and x.event_contract='A.7d09be7121e058eb.NBAsageNFT' and x.event_type='NFTPurchased'
    and x.event_data:name='NBAsage Yes' and y.event_type='Deposited' and y.event_data:to<>'0xf919ee77447b7497' and y.event_data:amount is not null
    group by 1,2 order by 1 desc

    -- per saber volume, event_type='Deposited' and event_data:to <> '0xf919ee77447b7497' -- es nomes per fees
    -- agafar el event_data:amount i el event_data:to com a seller i el event_data:type com a moneda
    Last run: 4 days ago
    DATE
    ASSET
    NFT_SALES
    VOLUME
    TOTAL_VOLUME
    AVG_NFT_PRICE
    1
    2025-03-01 00:00:00.000A.f1ab99c82dee3526.USDCFlow.Vault1092724136.7153989.71.104806152
    2
    2025-02-01 00:00:00.000A.f1ab99c82dee3526.USDCFlow.Vault737116941.51298531.139920603
    3
    2025-01-01 00:00:00.000A.f1ab99c82dee3526.USDCFlow.Vault1764643045.25112911.51.214183967
    4
    2024-12-01 00:00:00.000A.f1ab99c82dee3526.USDCFlow.Vault2078548838.369866.251.171491281
    5
    2024-11-01 00:00:00.000A.f1ab99c82dee3526.USDCFlow.Vault1003021027.9521027.951.043726113
    5
    495B
    20s