Yousefi_1994World Cup Round of 32 - Optimism USDC Usage Patterns top 10
Updated 2023-04-20Copy Reference Fork
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
›
⌄
-------------------------------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-------------------------------
optimism_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,
'Optimism' as chain
from optimism.core.fact_token_transfers, fix_parameter
where contract_address = '0x7f5c764cbc14f9669b88837ca1490cca17c31607'
and raw_amount::float > 0
and block_timestamp >= current_date - time_frame
),
optimism_results as (
select
receiver as "Receiver",
sum(transfer_amount) as "Amount of USDC transferred"
Run a query to Download Data