adambalaexa4
Updated 2023-01-04
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
›
⌄
with mint as
(select BLOCK_TIMESTAMP, NFT_TO_ADDRESS ,TOKENID ,MINT_PRICE_ETH ,MINT_PRICE_USD ,NFT_COUNT ,TX_FEE,tx_hash
from ethereum.core.ez_nft_mints
where NFT_ADDRESS=lower('0x8a90CAb2b38dba80c64b7734e58Ee1dB38B8992e')
and EVENT_TYPE ='nft_mint'
and PROJECT_NAME='doodles'
and NFT_FROM_ADDRESS='0x0000000000000000000000000000000000000000')
, DETAIL AS
(select
NFT_TO_ADDRESS ,
count(distinct tx_hash) as tx ,
count(distinct TOKENID) as NFT_minted ,
sum(MINT_PRICE_ETH) as ETH ,
SUM(MINT_PRICE_USD) AS USD ,
SUM(TX_FEE) AS FEE
FROM MINT GROUP BY 1)
SELECT
case
when NFT_minted = 1 then '1'
when NFT_minted = 2 then '2'
when NFT_minted = 3 then '3'
when NFT_minted = 4 then '4'
when NFT_minted = 5 then '5'
when NFT_minted between 5 and 10 then '5 - 10'
when NFT_minted between 10 and 15 then '10 - 15'
when NFT_minted > 15 then 'more than 15 '
end as "name" ,
COUNT(DISTINCT NFT_TO_ADDRESS) AS "value"
FROM DETAIL GROUP BY 1
Run a query to Download Data