MLDZMNxdai7
Updated 2023-03-06
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
›
⌄
select
case
when RAW_AMOUNT/1e18>0 and RAW_AMOUNT/1e18<=100 then 'a. < 100'
when RAW_AMOUNT/1e18>100 and RAW_AMOUNT/1e18<=1000 then 'b. 100-1,000'
when RAW_AMOUNT/1e18>1000 and RAW_AMOUNT/1e18<=5000 then 'c. 1,000-5,000'
when RAW_AMOUNT/1e18>5000 and RAW_AMOUNT/1e18<=20000 then 'd. 5,000-20,000'
when RAW_AMOUNT/1e18>20000 then 'e. > 20,000'
end as bucket,
count(distinct tx_hash) as sale_no,
count(distinct FROM_ADDRESS) as wallets
FROM ethereum.core.fact_token_transfers
WHERE (contract_address = lower('0x6B175474E89094C44Da98b954EedeAC495271d0F')
AND (TO_ADDRESS = lower('0x4aa42145Aa6Ebf72e164C9bBC74fbD3788045016') OR FROM_ADDRESS = lower('0x4aa42145Aa6Ebf72e164C9bBC74fbD3788045016'))
AND (TO_ADDRESS != lower('0x5d3a536e4d6dbd6114cc1ead35777bab948e3643') AND FROM_ADDRESS != lower('0x5d3a536e4d6dbd6114cc1ead35777bab948e3643'))
)
and BLOCK_TIMESTAMP>=CURRENT_DATE- {{Time_period_days}}
group by 1 having bucket is not null
Run a query to Download Data