parisaaTop 10 Active CrossChain Pair by Txn Activity [ Axelar ] copy
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 CryptoGowda / Top 10 Active CrossChain Pair by Txn Activity [ Axelar ] @ https://flipsidecrypto.xyz/CryptoGowda/q/uiwyPgRE9Vgg/top-10-active-crosschain-pair-by-txn-activity-axelar-]
WITH
hourly_token_prices AS (
SELECT
date_trunc('day', hour) AS day,
symbol,
avg(price) AS price_usd
FROM
crosschain.core.ez_hourly_prices
GROUP BY
1,
2
),
squid_txns as (
select
block_number,
block_timestamp,
tx_hash,
source_chain,
destination_chain,
sender,
amount,
amount * price_usd as amount_usd,
token_address,
token_symbol,
'Squid' as router,
CONCAT(source_chain, '-', destination_chain) AS crosschain_pair
from
axelar.core.ez_squid
left join hourly_token_prices htp on date_trunc('day', block_timestamp) = htp.day
and token_symbol = htp.symbol
),
satellite_txns as (
select
block_number,
Run a query to Download Data