mariyaThe percentage of stablecoins group 2 swaps made by bots
Updated 2022-05-23
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
›
⌄
SELECT 'stablecoins gr2' as label,
date_trunc('day',block_timestamp) as date,
COUNT (tx_id) as n_swaps,
sum(swap_from_amount) as amnt_from,
sum(swap_to_amount) as amnt_to,
count(DISTINCT swapper),
swap_program
FROM flipside_prod_db.solana.fact_swaps
WHERE date>= '2022-04-01'
AND succeeded = 'TRUE'
AND swap_from_mint IN
('Ea5SjE2Y6yvCeW5dYTn7PYMuW5ikXkvbGdcmSnXeaLjS' ,'7kbnvuGBxxj8AG9qp8Scn56muWGaRaFqxg1FsRp3PaFT' ,'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX')
AND swap_to_mint IN
('Ea5SjE2Y6yvCeW5dYTn7PYMuW5ikXkvbGdcmSnXeaLjS' ,'7kbnvuGBxxj8AG9qp8Scn56muWGaRaFqxg1FsRp3PaFT' ,'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX')
AND swapper in
(SELECT DISTINCT swapper
from (
SELECT swapper,
date_trunc('hour', block_timestamp) as hours,
count(tx_id) as n_swaps
FROM flipside_prod_db.solana.fact_swaps
WHERE block_timestamp >= '2022-04-01'
GROUP by swapper, hours
)
WHERE n_swaps >= 60)
GROUP by date,swap_program
UNION
SELECT 'all except stablecoins gr2' as label,
date_trunc('day',block_timestamp) as date,
COUNT (tx_id) as n_swaps,
sum(swap_from_amount) as amnt_from,
sum(swap_to_amount) as amnt_to,
count(DISTINCT swapper),
swap_program
FROM flipside_prod_db.solana.fact_swaps
WHERE date>= '2022-04-01'
Run a query to Download Data