Popex404 Bridge metrics by Token
Updated 2022-11-18Copy Reference Fork
999
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
›
⌄
-- Using the Bridge Query from alik110 https://app.flipsidecrypto.com/dashboard/05IlAD
-- Sadly for this part i can't use my growth rate so i used the same query, but distinct charts
with txtable as (
select tx_id,
ATTRIBUTE_VALUE as chain
from axelar.core.fact_msg_attributes
where ATTRIBUTE_KEY = 'destinationChain'
and block_timestamp::date >= CURRENT_DATE - 30),
usertable as (
select ATTRIBUTE_VALUE as User,
tx_id
from axelar.core.fact_msg_attributes
where tx_id in (select tx_id from txtable)
and ATTRIBUTE_KEY = 'spender'),
maintable1 as (
select distinct user,
date_trunc(day,block_timestamp) as date,
t1.tx_id,
chain,
t1.ATTRIBUTE_VALUE
from axelar.core.fact_msg_attributes t1 join txtable t2 on t1.tx_id = t2.tx_id
join usertable t3 on t1.tx_id = t3.tx_id
where MSG_TYPE = 'coin_spent'
and ATTRIBUTE_INDEX = 1),
labeltable as (
select date,
attribute_value,
tx_id,
user,
chain,
case when attribute_value like '%uaxl%' then 'AXL'
when attribute_value like '%uusdc%' then 'USDC'
Run a query to Download Data