with t1 as (SELECT
x.BLOCK_TIMESTAMP as BLOCK_TIMESTAMP,
x.tx_hash AS tx_hash,
x.TX_SIGNER AS TX_SIGNER,
x.TX_RECEIVER as TX_RECEIVER,
x.NFT_ID as NFT_ID,
y.tx:actions[0]:FunctionCall:deposit / 1e24 AS Volume
from near.core.ez_nft_mints x JOIN near.core.fact_transactions y on x.tx_hash = y.tx_hash
WHERE x.TX_STATUS='Success')
SELECT
COUNT(DISTINCT tx_hash) AS "Total Number of Mints",
COUNT(DISTINCT TX_SIGNER) AS "Total Number of Minters",
count(distinct TX_RECEIVER) as "Total Number of Collections",
COUNT(DISTINCT NFT_ID) as "Number of Minted NFTs",
SUM(Volume) AS "Total Volume of Mints"
from t1