AephiaGolden tickets 2024
Updated 2025-04-19
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
›
⌄
WITH token_prices AS (
SELECT
hour::DATE AS DATE,
---AVG(close) AS atlas_price
AVG(case when token_address = 'ATLASXmbPQxBUYbxPsV97usA3fPQYEqzQBUHgiFCUsXx'
then price end) as atlas_price,
AVG(case when token_address = 'So11111111111111111111111111111111111111112'
then price end) as sol_price
FROM
SOLANA.price.ez_prices_hourly
WHERE
hour::DATE >= current_date-120 --'2022-07-22'
GROUP BY ALL
--order by 1 desc
)
,sage_volumes AS (
select
--*
date_trunc('day', block_timestamp::date) as date,
----------------------------------------------------
sum(case when inner_instruction:instructions[2]:parsed:info:mint::string = 'ARCoQ9dndpg6wE2rRexzfwgJR3NoWWhpcww3xQcQLukg' then inner_instruction:instructions[2]:parsed:info:tokenAmount:uiAmount when inner_instruction:instructions[1]:parsed:info:mint::string = 'ARCoQ9dndpg6wE2rRexzfwgJR3NoWWhpcww3xQcQLukg' then inner_instruction:instructions[1]:parsed:info:tokenAmount:uiAmount
end) AS ARCO_amount,
sum(case when inner_instruction:instructions[2]:parsed:info:mint::string = 'ARCoQ9dndpg6wE2rRexzfwgJR3NoWWhpcww3xQcQLukg' AND inner_instruction:instructions[1]:parsed:info:mint::string = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' then (inner_instruction:instructions[0]:parsed:info:tokenAmount:uiAmount + inner_instruction:instructions[1]:parsed:info:tokenAmount:uiAmount) when inner_instruction:instructions[1]:parsed:info:mint::string = 'ARCoQ9dndpg6wE2rRexzfwgJR3NoWWhpcww3xQcQLukg' AND inner_instruction:instructions[2]:parsed:info:mint::string = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' then (inner_instruction:instructions[0]:parsed:info:tokenAmount:uiAmount + inner_instruction:instructions[2]:parsed:info:tokenAmount:uiAmount)
end) AS ARCO_usdc_amount,
sum(case when inner_instruction:instructions[2]:parsed:info:mint::string = 'ARCoQ9dndpg6wE2rRexzfwgJR3NoWWhpcww3xQcQLukg' AND inner_instruction:instructions[1]:parsed:info:mint::string = 'ATLASXmbPQxBUYbxPsV97usA3fPQYEqzQBUHgiFCUsXx' then (inner_instruction:instructions[0]:parsed:info:tokenAmount:uiAmount + inner_instruction:instructions[1]:parsed:info:tokenAmount:uiAmount) when inner_instruction:instructions[1]:parsed:info:mint::string = 'ARCoQ9dndpg6wE2rRexzfwgJR3NoWWhpcww3xQcQLukg' AND inner_instruction:instructions[2]:parsed:info:mint::string = 'ATLASXmbPQxBUYbxPsV97usA3fPQYEqzQBUHgiFCUsXx' then (inner_instruction:instructions[0]:parsed:info:tokenAmount:uiAmount + inner_instruction:instructions[2]:parsed:info:tokenAmount:uiAmount)
end) AS ARCO_atlas_amount,
sum(case when inner_instruction:instructions[2]:parsed:info:mint::string = 'MASS9GqtJz6ABisAxcUn3FeR4phMqH1XfG6LPKJePog' then inner_instruction:instructions[2]:parsed:info:tokenAmount:uiAmount when inner_instruction:instructions[1]:parsed:info:mint::string = 'MASS9GqtJz6ABisAxcUn3FeR4phMqH1XfG6LPKJePog' then inner_instruction:instructions[1]:parsed:info:tokenAmount:uiAmount
end) AS BIOMASS_amount,
sum(case when inner_instruction:instructions[2]:parsed:info:mint::string = 'MASS9GqtJz6ABisAxcUn3FeR4phMqH1XfG6LPKJePog' AND inner_instruction:instructions[1]:parsed:info:mint::string = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' then (inner_instruction:instructions[0]:parsed:info:tokenAmount:uiAmount + inner_instruction:instructions[1]:parsed:info:tokenAmount:uiAmount) when inner_instruction:instructions[1]:parsed:info:mint::string = 'MASS9GqtJz6ABisAxcUn3FeR4phMqH1XfG6LPKJePog' AND inner_instruction:instructions[2]:parsed:info:mint::string = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' then (inner_instruction:instructions[0]:parsed:info:tokenAmount:uiAmount + inner_instruction:instructions[2]:parsed:info:tokenAmount:uiAmount)
end) AS BIOMASS_usdc_amount,
sum(case when inner_instruction:instructions[2]:parsed:info:mint::string = 'MASS9GqtJz6ABisAxcUn3FeR4phMqH1XfG6LPKJePog' AND inner_instruction:instructions[1]:parsed:info:mint::string = 'ATLASXmbPQxBUYbxPsV97usA3fPQYEqzQBUHgiFCUsXx' then (inner_instruction:instructions[0]:parsed:info:tokenAmount:uiAmount + inner_instruction:instructions[1]:parsed:info:tokenAmount:uiAmount) when inner_instruction:instructions[1]:parsed:info:mint::string = 'MASS9GqtJz6ABisAxcUn3FeR4phMqH1XfG6LPKJePog' AND inner_instruction:instructions[2]:parsed:info:mint::string = 'ATLASXmbPQxBUYbxPsV97usA3fPQYEqzQBUHgiFCUsXx' then (inner_instruction:instructions[0]:parsed:info:tokenAmount:uiAmount + inner_instruction:instructions[2]:parsed:info:tokenAmount:uiAmount)
Auto-refreshes every 6 hours
QueryRunArchived: QueryRun has been archived