0xbiwallet_list
Updated 2024-11-24
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 solana_trade_dim as
-- (
-- select
-- case when token_bought_mint_address='So11111111111111111111111111111111111111112' then token_bought_mint_address else token_sold_mint_address end as quote_token,
-- case when token_sold_mint_address='So11111111111111111111111111111111111111112' then token_bought_mint_address else token_sold_mint_address end as base_token,
-- case when token_bought_mint_address='So11111111111111111111111111111111111111112' then token_bought_amount else token_sold_amount end as quote_amount,
-- case when token_sold_mint_address='So11111111111111111111111111111111111111112' then token_bought_amount else token_sold_amount end as base_amount,
-- case when token_bought_mint_address='So11111111111111111111111111111111111111112' then token_bought_symbol else token_sold_symbol end as quote_symbol,
-- case when token_sold_mint_address='So11111111111111111111111111111111111111112' then token_bought_symbol else token_sold_symbol end as base_symbol,
-- case when token_bought_mint_address='So11111111111111111111111111111111111111112' then 'SELL' else 'BUY' end as trade_type,
-- *
-- from solana.defi.ez_dex_swaps
-- where (SWAP_FROM_MINT='So11111111111111111111111111111111111111112' or SWAP_TO_MINT='So11111111111111111111111111111111111111112')
-- )
-- select
-- trader_id
-- ,sum(quote_amount) as total_buy_amount_sol
-- ,count(distinct tx_id) as but_tx_count
-- ,min(block_time) as first_buy_time
-- from solana_trade_dim
-- where base_token='{{ca}}'
-- and block_time>=timestamp'{{start_time}}' and block_time<=timestamp'{{end_time}}'
-- and trade_type='BUY'
-- group by 1
-- having sum(quote_amount)>=0.05
-- order by total_buy_amount_sol desc
select
*
from solana.defi.ez_dex_swaps
where (SWAP_FROM_MINT='So11111111111111111111111111111111111111112' or SWAP_TO_MINT='So11111111111111111111111111111111111111112')
order by BLOCK_TIMESTAMP desc
limit 10
QueryRunArchived: QueryRun has been archived