Query editor
/* !Generated view warning: you can't query views in dune_user_generated anymore. All queries in DuneSQL are by default views though (try querying the table 'query_1747157') */WITHsale_bnb AS (SELECTSUM(amount_bnb_sell) AS volume,COUNT(DISTINCT buyer_address) AS unique_buyer,COUNT(DISTINCT tx_hash) AS sale_count,dtFROM(SELECT(value / CAST(1e18 AS DOUBLE)) AS amount_bnb_sell,"from" AS buyer_address,"to" AS seller_address,tx_hash,DATE_TRUNC('day', TRY_CAST(block_time AS DATE)) AS dt,ROW_NUMBER() OVER (PARTITION BYtx_hashORDER BYvalue DESC) AS sale_orderFROMbnb.tracesWHEREblock_time > timestamp'2022-11-01'AND tx_hash IN (SELECTevt_tx_hashFROMerc721_bnb.evt_TransferWHEREcontract_address = 0x2af749593978cb79ed11b9959cd82fd128ba4f8dAND "from" != 0x0000000000000000000000000000000000000000)AND value > cast(0 as uint256)) AS aGROUP BY4),sale AS (SELECTSUM(amount_bnb_sell) AS volume,COUNT(DISTINCT buyer) AS unique_buyer,COUNT(DISTINCT evt_tx_hash) AS sale_count,dtFROM(SELECTamount_bnb_sell,nft.buyer_address AS buyer,nft.seller_address AS seller,token_id,nft.evt_tx_hash,dtFROM(SELECT"from" AS seller_address,"to" AS buyer_address,