freemartianBasepaint Painter who minted a brush
Updated 2023-10-14
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
›
⌄
WITH datas AS(
SELECT
DISTINCT from_address AS user
FROM base.core.fact_transactions
UNION
SELECT DISTINCT to_address AS user
FROM base.core.fact_transactions
),
-- Painters
Painters AS (
SELECT
tx_hash,
decoded_log:author AS painter,
decoded_log:day AS nft_ID,
decoded_log:tokenId AS brushes
FROM base.core.ez_decoded_event_logs
WHERE contract_address = '0xba5e05cb26b78eda3a2f8e3b3814726305dcac83'
AND event_name = 'Painted'
),
-- brush minters
minters AS (
SELECT
block_timestamp,
tx_hash,
nft_to_address as minter
FROM base.nft.ez_nft_transfers
WHERE nft_address = '0xba5e05cb26b78eda3a2f8e3b3814726305dcac83'
AND event_type = 'mint'
AND minter IN (SELECT painter FROM painters)
),
users AS (
Run a query to Download Data