Query editor
with nft_creators as (selectnft_contract_address,blockchain,min_by(tx_from, block_number) as creator_addressfrom nft.mintswhereblock_date between date('2024-01-01') and date('2024-09-01')and blockchain in ('base', 'optimism', 'zora')group by 1,2union allselectnft_contract_address,blockchain,creator_addressfrom dune.gitcoin_dao.dataset_sunny_creator_contracts)selectnft_creators.creator_address,nft_creators.nft_contract_address,nft_creators.blockchain,count(distinct case when block_date > date('2024-06-01') then m.tx_hash end) as num_txns_90D,count(distinct m.tx_hash) as num_txns_180D,sum(case when block_date > date('2024-06-01') then coalesce(m.amount_usd,0) else 0 end) as amount_usd_90D,sum(coalesce(m.amount_usd,0)) as amount_usd_180D,array_agg(distinct case when block_date > date('2024-06-01') then m.buyer end) as buyers_90D,array_agg(distinct m.buyer) as buyers_180Dfrom nft.mints as mjoin nft_creatorson m.nft_contract_address = nft_creators.nft_contract_addressand m.blockchain = nft_creators.blockchainwherem.block_date between date('2024-02-01') and date('2024-09-01')and nft_creators.creator_address in (0xd0966b2d8d48e057105afa7a1b84bf1188fb00f0,0x72ba95d9701b0ae496ab4320010a43a764905b1b,0x5de2b5b72a0b49f7d4490a1fef61afa8415971f5,0xb1abf1039323f248514594a5ed1aef4f4fc95823,0x49000b54784c0359a9ed744a5f3505d39043e451,0x4b4324bcc6db9380abbbbd20b24a16c11fb5b38a,0x381cc779761212344f8400373a994d29e17522c6,0x164c3df08784171e0c4b61b7682263371f1eeb74,0x6826ba168776251688d4e3a6c4ac430cf4f185a8,0x2ea49c863be976ee9c10cb8ef382757e48f0b9e5,0x8f87d1feefa305a453174982df870fa93ebe2175,0x3cd76a3e1ae288c11459b986362ff2f63ba0a379,0x21339e2ce5ce1d7a19a28e774513619c0c6259da,0x830540b0750350b0e17c377c1cc56b19b7af4885,0x508dd44ff3404e618d430d4562c3773b073a5ccc,0x723bee2edd9595596a0ca2fa71ce505695735568,0x4fba94363621a3b86417d6d0b2819583263a9bc0,0x2fb0e475f6d495dfdfd9176af9113f48f7687565,0x8344d047332b3c8f5573fd54a87025c5e9409698,0x08e0a3e752d1338c0f02b986b9504f1009a962ca,0x85f15d0e945d96cf43a9156bc6ff63f8821b904a,0x6fb53031e2b3d7d4d6f7fad6d69952f87477bc82,0xcbc7d0ff51d37b60ba741bf566496bba53b5eea2,