adriaparcerisasop supply 2
Updated 2022-12-30
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 SEND as
(select origin_from_address,
sum(raw_amount/pow(10,decimals)) as sent_amount
from
optimism.core.fact_token_transfers x
join optimism.core.dim_contracts y on x.contract_address=y.address
WHERE contract_address='0x4200000000000000000000000000000000000042'
group by 1
),
RECEIVE as
(select origin_to_address,
sum(raw_amount/pow(10,decimals)) as received_amount
from
optimism.core.fact_token_transfers x
join optimism.core.dim_contracts y on x.contract_address=y.address
WHERE contract_address='0x4200000000000000000000000000000000000042'
group by 1
),
total_supp as (select sum(received_amount) as total_supply
from RECEIVE r
left join SEND s on r.origin_to_address=s.origin_from_address
where sent_amount is null),
t11 as
(select date_trunc('day',BLOCK_TIMESTAMP) as date,
sum(case when symbol_in ilike 'OP' then amount_in else null end) as from_amountt,
sum(case when symbol_out ilike 'OP' then amount_in else null end) as to_amountt
--from_amountt-to_amountt as circulating_volume
from optimism.velodrome.ez_swaps
group by 1
),
t12 as
(select date_trunc('day',BLOCK_TIMESTAMP) as date,
sum(case when symbol_in ilike 'OP' then amount_in else null end) as from_amountt,
Run a query to Download Data