buzzresearchBoB testing
Updated 2024-08-24
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
›
⌄
-- Average Prices Per Day
WITH AveragePrices AS (
SELECT
DATE(hour) AS avg_date,
token_address,
AVG(price) AS avg_price
FROM
ethereum.price.ez_prices_hourly
GROUP BY
1, 2
),
-- Latest Price for Specific Token
LatestPrice AS (
SELECT
hour AS latest_hour,
price AS latest_price
FROM
ethereum.price.ez_prices_hourly
WHERE
token_address = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
AND price > 0
ORDER BY
1 DESC
LIMIT 1
),
-- Token Transfers and Native Transfers
TokenTransfers AS (
SELECT
block_timestamp,
from_address AS user,
to_address AS pool,
amount AS transfer_amount,
symbol,
contract_address
QueryRunArchived: QueryRun has been archived