sarathaxl_token4.5
Updated 2022-12-02
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 axl_price as (
select
date_trunc('day', recorded_at) as DATE,
avg(price) as price
from osmosis.core.dim_prices
where symbol = 'AXL'
group by 1
)
,
Osmosis_Activity as (
select
'SWAP' as Action,
block_timestamp,
tx_id,
trader as User_address,
to_amount/pow(10,to_decimal) * price as amount_usd
from osmosis.core.fact_swaps a join axl_price b on a.block_timestamp::date = b.date
where 1=1
and
from_currency = 'ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E'
and
tx_status = 'SUCCEEDED'
union ALL
select
'Liquidity Providing' as Action,
block_timestamp,
tx_id,
liquidity_provider_address as User_address,
amount/pow(10,decimal) * price as amount_usd
from osmosis.core.fact_liquidity_provider_actions a join axl_price b on a.block_timestamp::date = b.date
where 1=1
and
currency = 'ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E'
AND
Run a query to Download Data