cybergenlab[Bridge Overview] Top Bridged Assets copy
Updated 2024-11-16
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
›
⌄
⌄
-- forked from [Bridge Overview] Top Bridged Assets @ https://flipsidecrypto.xyz/studio/queries/f588e813-2ab6-401e-88da-4702cbc93a97
with bridge_table as (
select
date_trunc('month', block_timestamp) as date,
token_symbol,
sum(amount_usd) as volume,
count(token_symbol) as occurence
from ethereum.defi.ez_bridge_activity
where block_timestamp >= dateadd(year, -2, date_trunc('month', current_date()))
and block_timestamp < date_trunc('month', current_date())
group by 1,2
)
select
date,
sum(volume) as volume
from bridge_table
where volume is not null
group by 1
order by 1 desc
/*
with bridge_vols as (
SELECT
date_trunc('month', block_timestamp::date) as ddate
, count(distinct TX_HASH) as txs
, count(distinct ORIGIN_FROM_ADDRESS) as users
, SUM(AMOUNT_USD) as usd_volume
, (usd_volume/txs) as usd_volume_per_transaction
QueryRunArchived: QueryRun has been archived