AephiaGolden tickets 2024
    Updated 8 days ago
    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)
    Last run: 8 days agoAuto-refreshes every 6 hours
    DATE
    GT_COSTS_COMP
    GT_COSTS_RAW
    1
    2025-03-26 00:00:00.0003.992.84
    2
    2025-03-25 00:00:00.0004.052.8
    3
    2025-03-24 00:00:00.0004.012.85
    4
    2025-03-23 00:00:00.0004.182.86
    5
    2025-03-22 00:00:00.0004.213.03
    6
    2025-03-21 00:00:00.0004.323.05
    7
    2025-03-20 00:00:00.0004.513.24
    8
    2025-03-19 00:00:00.0004.43.21
    9
    2025-03-18 00:00:00.0004.453.18
    10
    2025-03-17 00:00:00.0004.353.18
    11
    2025-03-16 00:00:00.0004.363.17
    12
    2025-03-15 00:00:00.0004.363.29
    13
    2025-03-14 00:00:00.0004.333.23
    14
    2025-03-13 00:00:00.0004.143.16
    15
    2025-03-12 00:00:00.0004.473.2
    16
    2025-03-11 00:00:00.0004.243.36
    17
    2025-03-10 00:00:00.0004.533.41
    18
    2025-03-09 00:00:00.0004.193.41
    19
    2025-03-08 00:00:00.0003.863.4
    20
    2025-03-07 00:00:00.0003.893.29
    ...
    120
    4KB
    40s