dammyzuks[19] MDAO 101: DATE_TRUNC copy
Updated 2023-09-22
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
›
⌄
-- forked from metricsdao / [19] MDAO 101: DATE_TRUNC @ https://flipsidecrypto.xyz/metricsdao/q/TCdjdeeqdvGX/19]-mdao-101-date_trunc
SELECT
DATE_TRUNC('week', block_timestamp) as _date,
currency_symbol,
SUM(platform_fee) AS total_platform_fee,
SUM(platform_fee_usd) AS total_platform_fees_usd
FROM ethereum.core.ez_nft_sales
WHERE block_timestamp::DATE BETWEEN '2022-01-01' AND '2022-06-30'
AND platform_name = 'opensea'
GROUP BY 1, 2
ORDER BY 1, 4 DESC;
Run a query to Download Data