JonasoPayPal PYUSD (2)
Updated 2024-09-11
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
X as(
select block_timestamp, 0+mint_amount as balance, mint as contract from solana.defi.fact_token_mint_actions where succeeded = 'True' union all
select block_timestamp, 0-burn_amount as balance, mint as contract from solana.defi.fact_token_burn_actions where succeeded = 'True' ),
Y as(
select block_timestamp, 0+amount as balance, from_address as contract, contract_address from ethereum.core.ez_token_transfers union all
select block_timestamp, 0-amount as balance, to_address as contract, contract_address from ethereum.core.ez_token_transfers ),
A as(
select date_trunc('week',block_timestamp) as time, sum(balance/1e6) as balance
from X
where lower(contract) = '2b1kv6dkpanxd5ixfnxcpjxmkwqjjaymczfhsfu24gxo'
group by 1 ),
B as(
select date_trunc('week',block_timestamp) as time, sum(balance) as balance
from Y
where lower(contract) = '0x0000000000000000000000000000000000000000'
and contract_address = lower('0x6c3ea9036406852006290770BEdFcAbA0e23A0e8')
group by 1 ),
C as(
select 'Solana' as chain, * from A union all
select 'Ethereum' as chain, * from B )
select chain, supply, supply/sum(supply) over()*100 as ratio
from (select chain, sum(balance) as supply from C group by 1)
QueryRunArchived: QueryRun has been archived