KaskoazulRAYDIUM TOP 10 TO
Updated 2022-04-03
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 FIRSTJOIN as (
select block_timestamp::date as fecha,
tx_id,
swap_from_mint,
address_name as swap_from,
swap_to_mint
from solana.fact_swaps fs
inner join solana.dim_labels dl
on fs.swap_from_mint = dl.address
where fecha >= '2022-01-01'
and fecha < CURRENT_DATE - 1
and swap_program = 'raydium v4'
and succeeded = 'TRUE'
),
SECONDJOIN as (
select fecha,
tx_id,
swap_from_mint,
swap_from,
swap_to_mint,
address_name as swap_to,
concat_ws ('-',swap_from_mint, swap_to_mint) as swap_pair_mint,
concat_ws ('-', swap_from, swap_to) as swap_pair
from FIRSTJOIN fj
inner join solana.dim_labels dl
on fj.swap_to_mint = dl.address
),
TOP10_FROM as (
select count (tx_id) as swaps,
swap_from,
swap_from_mint
from SECONDJOIN
group by 2,3
order by 1 desc
Run a query to Download Data