Pine AnalyticsBASE 2
Updated 2024-06-04
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
SELECT
date_trunc('week', block_timestamp) as week,
-- platform,
count(DISTINCT tx_hash) as events,
count(DISTINCT ORIGIN_FROM_ADDRESS) as users,
sum(
CASE
when not amount_in_usd is NULL
then amount_in_usd
when not amount_out_usd is NULL
then amount_out_usd
else 0 end
) as volume_usd
FROM base.defi.ez_dex_swaps
WHERE not week is NULL
--LIMIT 100
GROUP BY 1 --,2
QueryRunArchived: QueryRun has been archived