alessio9567IXS Market cap over time
    Updated 2024-10-10
    WITH price_data AS (
    -- Get the daily average price of IXS
    SELECT
    date_trunc('day', hour) AS day,
    symbol,
    AVG(price) AS price
    FROM
    ethereum.price.ez_prices_hourly
    WHERE
    token_address = '0x73d7c860998ca3c01ce8c808f5577d94d545d1b4'
    GROUP BY
    day,
    symbol
    ),
    supply_data AS (
    -- Calculate the IXS supply over time across Ethereum, Base, and Polygon
    select
    day,
    chain,
    sum(ixs_minted_amount) as daily_ixs,
    sum(daily_ixs) OVER(
    PARTITION BY chain
    order by
    day
    ) as ixs_supply_over_time -- mint
    from
    (
    SELECT
    'ethereum' as chain,
    date_trunc('day', block_timestamp) as day,
    SUM(amount) as ixs_minted_amount
    from
    ethereum.core.ez_token_transfers
    where
    contract_address = '0x73d7c860998ca3c01ce8c808f5577d94d545d1b4'
    and (
    QueryRunArchived: QueryRun has been archived