DAYS | SYMBOL | DAILY_WETH_USD_VALUE | |
---|---|---|---|
1 | 2025-02-07 00:00:00.000 | WETH | 30067321389.854 |
2 | 2025-02-02 00:00:00.000 | WETH | 781987100650.1 |
3 | 2025-02-10 00:00:00.000 | WETH | 40271165286.5435 |
4 | 2025-02-04 00:00:00.000 | WETH | 316990164976.083 |
5 | 2025-02-05 00:00:00.000 | WETH | 24526193629.5906 |
6 | 2025-02-03 00:00:00.000 | WETH | 327914339059.561 |
7 | 2025-02-09 00:00:00.000 | WETH | 41311011627.4104 |
8 | 2025-02-06 00:00:00.000 | WETH | 24521225798.4196 |
9 | 2025-02-01 00:00:00.000 | WETH | 590609552447.601 |
10 | 2025-02-08 00:00:00.000 | WETH | 35721549700.6762 |
DeFiScholarSession 1 - Date Manipulation & Aggregates copy
Updated 2025-03-14
999
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
›
⌄
-- forked from sam / Session 1 - Date Manipulation & Aggregates @ https://flipsidecrypto.xyz/sam/q/wSZcYxAc1Jg9/session-1---date-manipulation-aggregates
/*
date manipulations - date trunc vs ::date . Hour, day, month, year
filtering with dates >=
Aggregations: Sum, max
CTEs
contract address
*/
-- select
-- block_timestamp,
-- block_timestamp::date,
-- date_trunc('hour', block_timestamp),
-- date_trunc('day', block_timestamp) as days,
-- date_trunc('week', block_timestamp),
-- date_trunc('month', block_timestamp),
-- date_trunc('year', block_timestamp)
-- from base.core.fact_transactions
-- where days >= '2025-01-01'
-- limit 10
-- tx fees by address by day
-- select
-- block_timestamp::Date as days ,
-- from_address,
-- sum(tx_fee) as total_tx_fee,
-- avg(tx_fee),
-- median(tx_fee),
-- max(tx_fee),
-- min(tx_fee),
-- count(1), -- this just counts how many rows
-- count(*)
-- from base.core.fact_transactions
-- where block_timestamp::date between '2025-03-01' and '2025-03-10'
-- and from_address in (
Last run: 3 months ago
10
518B
4s