Afonso_Diaz2023-08-04 11:13 PM
Updated 2023-08-04
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
t as (
select
recorded_hour::date as date,
symbol,
token_address,
avg(close) as price_usd
from solana.core.ez_token_prices_hourly
group by 1, 2, 3
),
t2 as (
select
swapper as new_user,
min(block_timestamp) as min_date
from solana.core.fact_swaps
where swap_program ilike 'jupiter%'
group by 1
),
t3 as (
select
tx_id,
block_timestamp,
case
when block_timestamp::date < '2023-07-27' then 'Before Announcement'
when block_timestamp::date = '2023-07-27' then 'Announcement Day'
else 'After Announcement'
end as timespan,
swapper,
a.symbol as symbol_in,
b.symbol as symbol_out,
swap_from_amount * a.price_usd as amount_in_usd,
swap_to_amount * b.price_usd as amount_out_usd
from solana.core.fact_swaps
Run a query to Download Data