HaisenbergTop-10-pairs-by-swap-count
Updated 2023-10-28
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 swappair AS (
SELECT
concat(swap_to_mint, '-', swap_from_mint) as contracts,
count(*) as swapcount,
swap_from_mint,
swap_to_mint
FROM
solana.defi.fact_swaps
WHERE
block_timestamp :: date >= '2021-01-01'
AND succeeded = 'True'
AND swap_program ilike '%raydium%'
GROUP BY
contracts,
swap_from_mint,
swap_to_mint
ORDER BY
swapcount DESC
LIMIT
10
),
labelpair_from AS (
select
label as label_from,
swapcount
From
swappair s
LEFT OUTER JOIN solana.core.dim_labels b on s.swap_from_mint = b.address
GROUP BY
label_from,
swapcount
ORDER BY
swapcount DESC
LIMIT
10
Run a query to Download Data