Updated 2023-05-03
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
select
date_trunc('Day', BLOCK_TIMESTAMP)::Date AS Day,
TOKEN0_BALANCE_USD AS "USDC Balance (USD)",
TOKEN1_BALANCE_USD AS "USDT Balance (USD)",
"USDC Balance (USD)" + "USDT Balance (USD)" AS "Total Value Locked"
from
ethereum.uniswapv3.ez_pool_stats
inner join (
select
BLOCK_TIMESTAMP::Date AS date,
max(BLOCK_TIMESTAMP) AS Last_time
from
ethereum.uniswapv3.ez_pool_stats
where
POOL_ADDRESS = '0x3416cf6c708da44db2624d63ea0aaef7113527c6'
group by 1
) on date=BLOCK_TIMESTAMP::Date and BLOCK_TIMESTAMP=Last_time
where
POOL_ADDRESS = '0x3416cf6c708da44db2624d63ea0aaef7113527c6'
and BLOCK_TIMESTAMP >= dateadd('Day', - {{Last_N_days}}, current_date)
order by 1 desc
Run a query to Download Data