Mrfti2023-10-24 07:09 PM
Updated 2023-10-24Copy Reference Fork
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 Holders analysis @ https://flipsidecrypto.xyz/edit/queries/2195c9fe-2f96-4bf1-a506-746619fc10f5
-- forked from Abbas_ra21 / Top Holders 3 @ https://flipsidecrypto.xyz/Abbas_ra21/q/7XcncLy2HEoU/top-holders-3
(
with
price AS (
select
date_trunc(Day,hour) AS Day,
price AS TOKEN_Price
from
crosschain.price.ez_hourly_token_prices
where
TOKEN_address = lower('0xdf3ac4F479375802A821f7b7b46Cd7EB5E4262cC')
AND BLOCKCHAIN = 'ethereum'
group by 1,2
),
bal AS (
select
FROM_ADDRESS AS user,
-sum(amount) AS Amt
from
ethereum.core.ez_token_transfers
where
Contract_ADDRESS = lower('0xdf3ac4F479375802A821f7b7b46Cd7EB5E4262cC')
group by
1
union ALL
select
TO_ADDRESS AS user,
sum(amount) AS Amt
from
ethereum.core.ez_token_transfers
where
Contract_ADDRESS = lower('0xdf3ac4F479375802A821f7b7b46Cd7EB5E4262cC')
group by
1
),
Run a query to Download Data