RayyykOptimism Bridge 7
Updated 2022-10-23Copy 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
›
⌄
with table_1 as (select address
from ethereum.core.dim_labels
where label like '%optimism%'
and label_type = 'layer2'),
table_2 as (select date_trunc('{{Periodical}}', block_timestamp) as month,
symbol,
count(distinct(tx_hash)) as tx_count,
sum(amount_usd) as usd_volume
from ethereum.core.ez_token_transfers a
inner join ethereum.core.dim_labels b on b.address = a.from_address
where to_address in (select address from table_1)
and block_timestamp >= '{{Starting_Date}}'
group by 1,2
union
select date_trunc('{{Periodical}}', block_timestamp) as month,
'ETH' as symbol,
count(distinct(tx_hash)) as tx_count,
sum(amount_usd) as usd_volume
from ethereum.core.ez_eth_transfers
where eth_to_address in (select address from table_1)
and block_timestamp >= '{{Starting_Date}}'
group by 1,2),
table_3 as (select address
from ethereum.core.dim_labels
where label like '%hop%'
and label_type = 'layer2'),
table_4 as (select date_trunc('{{Periodical}}', block_timestamp) as month,
symbol,
count(distinct(tx_hash)) as tx_count,
sum(amount_usd) as usd_volume
from ethereum.core.ez_token_transfers a
inner join ethereum.core.dim_labels b on b.address = a.from_address
where to_address in (select address from table_3)
Run a query to Download Data