jackguy2023-08-03 05:57 PM
Updated 2023-11-01
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
34
35
36
›
⌄
SELECT
nft_address,
project_name,
count(DISTINCT address) as holders,
sum(holding) as nfts_minted
FROM (
SELECT
address,
project_name,
nft_address,
count(CASE when tx_type LIKE 'in' then 1 end) - count(CASE when tx_type LIKE 'out' then 1 end) as holding
FROM (
SELECT
project_name,
nft_address,
'out' as tx_type,
nft_from_address as address
FROM base.core.ez_nft_transfers
UNION
SELECT
project_name,
nft_address,
'in' as tx_type,
nft_to_address as address
FROM base.core.ez_nft_transfers
)
GROUP BY 1,2,3
)
WHERE not holding = 0
and not address LIKE '0x0000000000000000000000000000000000000000'
Run a query to Download Data