cloudr3nChad Doge Top Holder List
Updated 2023-04-13
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 mint as (
select block_timestamp,
origin_from_address as address,
event_inputs:tokenId::INTEGER as tokenId
from avalanche.core.fact_event_logs
where event_name='Transfer' and contract_address='0x357928b721890ed007142e45502a323827caf812' and event_inputs:from='0x0000000000000000000000000000000000000000' --and event_inputs:tokenId::INTEGER >=250
),
transfer as (
select block_timestamp, event_inputs:to as address, event_inputs:tokenId::INTEGER as tokenId
from avalanche.core.fact_event_logs
where event_name='Transfer' and contract_address='0x357928b721890ed007142e45502a323827caf812' and event_inputs:from not in ('0x0000000000000000000000000000000000000000') and event_inputs:to not in ('0xc28f1550160478a7fb3b085f25d4b179e08e649a')
),
combine as (
select * from mint
union ALL
select * from transfer
),
max_time as (
select
max(block_timestamp) as latest_time,
/*
case when max(block_timestamp)=to_timestamp_ntz('2022-07-08 18:47:54.000') and tokenId=2329 then '2022-07-08 18:47:55.000'
else max(block_timestamp) end as latest_time,*/
tokenId
from combine
group by tokenId
),
current_holders as(
select DISTINCT
a.latest_time,
b.tokenId,
b.address
from combine b, max_time a
where a.latest_time=b.block_timestamp and a.tokenId=b.tokenId
),
Run a query to Download Data