freeman_7VOLUME AND FEES
    Updated 2025-01-24
    -- volue and fees

    With PlatformStatistic as (
    select
    day
    ,"Blockchain"
    ,coalesce(LIMITANDSIMPLE_VOLUME,0) + coalesce(ADVN_VOLUME,0) as Total_volume
    ,coalesce(LIMITANDSIMPLEUSER,0) + coalesce(ADVANCED_USERS,0) as Total_User
    from $query('8f4c6614-783d-4b47-b2fd-96b725873b8e')
    )
    ,VolumeAndUsers as (
    SELECT
    day
    ,sum(Total_volume) as LifeTimeVolume
    ,sum(Total_User) as LifeTimeUsers
    from PlatformStatistic
    group by day
    )

    -- select
    -- day
    -- ,"Blockchain"
    -- ,LIMITANDSIMPLE_VOLUME + ADVN_VOLUME as Total_volume
    -- ,LIMITANDSIMPLEUSER + ADVANCED_USERS as Total_User
    -- from PlatformStatistic
    ,Revenue as (
    select
    date as day
    ,sum(Revenue) as TotalRevenue
    from (
    select
    date
    ,chain
    ,Revenue
    FROM external.defillama.fact_protocol_fees_revenue
    where protocol ilike 'ODOS'
    QueryRunArchived: QueryRun has been archived