AshlyCryptoTotal by DEX(X=>Y)
Updated 2023-04-27
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
›
⌄
-- I got guidance from this query
-- https://flipsidecrypto.xyz/0xHaM-d/q/2023-04-10-10-01-am-gVR7CX
SELECT
SOURCE_CHAIN || ' => ' || DESTINATION_CHAIN as route,
LABEL,
count(DISTINCT s.tx_hash) as tx_cnt,
count(DISTINCT sender) as usr_cnt,
sum(AMOUNT) as volume
FROM
axelar.core.ez_squid s
JOIN ethereum.core.ez_decoded_event_logs e on s.tx_hash = e.tx_hash
and s.BLOCK_TIMESTAMP::date = e.BLOCK_TIMESTAMP::date
JOIN ethereum.core.dim_labels l on e.contract_address = l.address
WHERE
LABEL_TYPE in ('dex', 'layer2')
GROUP by
1,
2
UNION
SELECT
SOURCE_CHAIN || ' => ' || DESTINATION_CHAIN as route,
PROJECT_NAME,
count(DISTINCT s.tx_hash) as tx_cnt,
count(DISTINCT sender) as usr_cnt,
sum(AMOUNT) as volume
FROM
axelar.core.ez_squid s
JOIN arbitrum.core.fact_event_logs e on s.tx_hash = e.tx_hash
and s.BLOCK_TIMESTAMP::date = e.BLOCK_TIMESTAMP::date
JOIN arbitrum.core.dim_labels l on e.contract_address = l.address
WHERE
LABEL_TYPE in ('dex', 'layer2')
GROUP by
1,
2
UNION
Run a query to Download Data