freeman_7VOLUME AND FEES
Updated 2025-01-24
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
›
⌄
-- 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