Yousefi_1994World Cup Round of 32 - Single Chain Distribution of Transfers Over Time
Updated 2023-01-03
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
›
⌄
-------------------------------Parameters-------------------------------
with fix_parameter as (
select
case
when '{{Days}}' = 'All time' then 2000
when '{{Days}}' = 'Last 30 days' then 30
when '{{Days}}' = 'Last 60 days' then 60
when '{{Days}}' = 'Last 90 days' then 90
when '{{Days}}' = 'Last 180 days' then 180
when '{{Days}}' = 'Last 360 days' then 360
else 30
end as time_frame
),
-------------------------------Ethereum-------------------------------
ethereum_usdc_transfers as (
select
block_timestamp,
tx_hash,
block_number,
from_address as sender,
to_address as receiver,
(raw_amount / pow(10, 6)) as transfer_amount,
'Ethereum' as chain
from ethereum.core.ez_token_transfers, fix_parameter
where contract_address = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
and symbol = 'USDC'
and raw_amount::float > 0
and from_address != '0x0000000000000000000000000000000000000000'
and to_address != '0x0000000000000000000000000000000000000000'
and block_timestamp >= current_date - time_frame
),
Run a query to Download Data