denze-e7j2NUFINAL_median holders ecosystem query copy
Updated 2023-05-17
999
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
›
⌄
-- forked from kqian / FINAL_median holders ecosystem query @ https://flipsidecrypto.xyz/kqian/q/deck-03-1PNcqp
-- forked from denze-e7j2NU / Deck_03 @ https://flipsidecrypto.xyz/denze-e7j2NU/q/deck-02-IZV_eD
-- forked from Deck_02 @ https://flipsidecrypto.xyz/edit/queries/f796059d-d65b-4dab-9bb4-06592d039365
-- forked from Holders by {{nft_contract_address}} - Multiple Contracts @ https://flipsidecrypto.xyz/edit/queries/a55ce213-0335-4cd9-bd3f-d5a7d45fea9e
-- forked from 4a31c144-891d-422d-9e02-84aa2a80baae
WITH
input_contracts AS (
SELECT
trim(F.value) AS nft_contract_address
FROM (
SELECT
SPLIT(data.nft_contract_address, ';') AS input
FROM VALUES
-- (lower('{{nft_contract_address}}'))
-- (lower('0x6efc003d3f3658383f06185503340c2cf27a57b6; 0x769272677fab02575e84945f03eca517acc544cc; 0x39ee2c7b3cb80254225884ca001f57118c8f21b6')) -- Memeland
-- (lower('0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d; 0x60e4d786628fea6478f785a6d7e704777c86a7c6; 0x34d85c9cdeb23fa97cb08333b511ac86e1c4e258')) -- Yuga
-- (lower('0xed5af388653567af2f388e6224dc7c4b3241c544 ; 0x306b1ea3ecdf94ab739f1910bbda052ed4a9f949')) -- Azuki
-- (lower('0x8a90cab2b38dba80c64b7734e58ee1db38b8992e ; 0x466cfcd0525189b573e794f554b8a751279213ac')) -- Doodles
-- (lower('0xed5af388653567af2f388e6224dc7c4b3241c544')) -- Azuki ONLY
-- (lower('0x769272677fab02575e84945f03eca517acc544cc')) -- Captainz
-- (lower('0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d')) -- BAYC
(lower('0x8a90cab2b38dba80c64b7734e58ee1db38b8992e')) -- Doodles
AS data(nft_contract_address)
) i
, Table(Flatten(i.input)) AS F
WHERE trim(F.value) regexp '^0x[0-9a-fA-F]{40}$' -- check address is a valid format, i.e. starts with 0x and has 42 characters total
)
, input_time AS (