Skip to content

Commit fc6aae4

Browse files
author
sam bacha
authored
feat(base): start base sql layers
1 parent e72ee8d commit fc6aae4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

dune/base/_price.sql

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
(
2+
SELECT date_trunc('day', minute) AS day, contract_address AS token, AVG(price) AS price
3+
FROM prices.usd
4+
GROUP BY 1, 2
5+
6+
union all
7+
8+
select date_trunc('day', hour) AS day, contract_address AS token, AVG(median_price) AS price
9+
FROM dex.view_token_prices
10+
GROUP BY 1, 2
11+
) as prices on b.day = prices.day

0 commit comments

Comments
 (0)