Afonso_DiazTotal
Updated 2025-05-05
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
pricet as (
select
hour::date as date,
symbol,
asset_id,
avg(price) as token_price_usd
from
stellar.price.ez_prices_hourly
group by 1, 2, 3
union all
select
hour::date as date,
'XML' as symbol,
-5706705804583548000 as asset_id,
avg(price) as token_price_usd
from
crosschain.price.ez_prices_hourly
where
blockchain = 'stellar'
and token_address is null
group by 1, 2, 3
),
main as (
select
history_operation_id,
block_timestamp,
buying_account_address as swapper,
iff(selling_asset_type = 'native', 'XLM', nvl(selling_asset_code, p1.symbol)) as symbol_in,
iff(buying_asset_type = 'native', 'XLM', nvl(buying_asset_code, p2.symbol)) as symbol_out,
selling_amount as amount_in,
buying_amount as amount_out,
QueryRunArchived: QueryRun has been archived