cristinatintoamaterasu Collection MINTS
    Updated 2024-12-14
    SELECT
    date_trunc('hour',x.block_timestamp) as week,
    count(distinct case when x.event_resource='Mint' then x.event_data:index:value end) as nft_mints,
    sum(nft_mints) over (order by week) as total_nft_mints,
    count(distinct case when xx.event_resource='TransferEvent' then xx.event_data:to end) as minter,
    SUM(case when y.event_resource='DepositEvent' then (y.event_data:amount/24)/pow(10,8) end) AS sales_volume,
    sum(sales_volume) over (order by week) as total_sales_volume
    FROM aptos.core.fact_events x
    join aptos.core.fact_events xx on x.tx_hash=xx.tx_hash
    join aptos.core.fact_events y on x.tx_hash=y.tx_hash
    where date_trunc('day',x.block_timestamp)>'2024-12-01' and x.event_resource='Mint' and x.event_module='collection' and xx.event_resource='TransferEvent' and y.event_resource='DepositEvent'
    and x.event_data:collection='0xd0ab8c2f76cd640455db56ca758a9766a966c88f77920347aac1719edab1df5e'
    group by 1
    order by 1 desc