metricsdao[15] MDAO 101: Date Casting and BETWEEN
Updated 2023-03-18Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
-- MetricsDAO Blockchain Analytics 101
-- https://docs.metricsdao.xyz/analyst-resources/blockchain-data-101
select
block_timestamp,
block_timestamp::date,
tx_hash
from ethereum.core.ez_nft_sales
-- try running this query each of the following 'where between' clauses
-- where block_timestamp between '2022-08-01' and '2022-08-02'
-- where block_timestamp between '2022-08-01' and '2022-08-02T00:00:00Z'
-- where block_timestamp::date between '2022-08-01' and '2022-08-02'
where block_timestamp between '2022-08-01' and '2022-08-02T23:59:59Z'
-- leave these so only a small result set is returned
and platform_name = 'opensea'
and project_name like '%punk%'
order by 1
Run a query to Download Data