fat3meh2023-06-08 01:22 PM
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
COUNT(*) AS dim_num_holders
FROM (
SELECT
ledger.account
, SUM(ledger.amount) / POWER(10, 18)
FROM (
SELECT
FROM_ADDRESS AS account
, CAST(RAW_AMOUNT as DECIMAL) * -1 as amount
FROM ethereum.core.fact_token_transfers
WHERE LOWER(contract_address) = LOWER('0xb3999F658C0391d94A37f7FF328F3feC942BcADC')
UNION ALL
SELECT
FROM_ADDRESS AS account
, CAST(RAW_AMOUNT as DECIMAL) * -1 as amount
FROM ethereum.core.fact_token_transfers
WHERE LOWER(contract_address) = LOWER('0x44Ec807ce2F4a6F2737A92e985f318d035883e47')
UNION ALL
SELECT
TO_ADDRESS AS account
, CAST(RAW_AMOUNT as DECIMAL) as amount
FROM ethereum.core.fact_token_transfers
WHERE LOWER(contract_address) = LOWER('0xb3999F658C0391d94A37f7FF328F3feC942BcADC')
UNION ALL
SELECT
TO_ADDRESS AS account
, CAST(RAW_AMOUNT AS DECIMAL) as amount
FROM ethereum.core.fact_token_transfers
WHERE LOWER(contract_address) = LOWER('0x44Ec807ce2F4a6F2737A92e985f318d035883e47')
Run a query to Download Data