yasmin-n-d-r-hcasual-black copy
Updated 2025-01-15
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
›
⌄
-- forked from [Orca-DEX] - Top traded assets by num traders @ https://flipsidecrypto.xyz/studio/queries/fa1da548-b3ed-446e-9f06-3aa16cfb957e
-- forked from [Orca-DEX] - Total @ https://flipsidecrypto.xyz/studio/queries/243b123e-8037-403b-acca-a6063e2734ab
with swap_txns as (
select
tx_id,
signers [0] trader,
block_timestamp :: date date,
from
eclipse.core.fact_events
where
program_id = '4UsSbJQZJTfZDFrgvcPBRCSg5BbcQE6dobnriCafzj12'
and SUCCEEDED = true
),
indexes as (
select
tx_id,
CAST(index || '.' || inner_index AS FLOAT) combined_index
from
swap_txns
left join eclipse.core.fact_transfers using (tx_id)
),
min_max_index as (
select
tx_id,
min (combined_index) min_index,
max (combined_index) max_index
from
indexes
group by 1
),
swap_from as (
select
tx_id,
trader,
QueryRunArchived: QueryRun has been archived