Skip to content

Commit

Permalink
Adding aggregate_by value
Browse files Browse the repository at this point in the history
  • Loading branch information
PoloX2021 committed Jan 10, 2025
1 parent 1c58da5 commit 3ba26cc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cowamm/dashboard/cow_amms_tvl_evolution_3968374.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
-- Query computes the TVL over all CoW AMMs

-- Parameters
-- {{aggregate_by}}: the frequence of the data, e.g. 'day', 'week', 'month'

with prep as (
select * from "query_4096107(blockchain='ethereum')"
union all
Expand All @@ -10,7 +14,7 @@ with prep as (
)

select
day,
date_trunc('{{aggregate_by}}', day) as period,
sum(tvl) as tvl
from prep
group by 1
Expand Down

0 comments on commit 3ba26cc

Please sign in to comment.