adam10New Wallets v Luna Price
Updated 2021-08-11
99
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
›
⌄
WITH new_users AS (
SELECT
MIN(date) as min_date,
address
FROM
terra.daily_balances
WHERE
balance > 0
GROUP BY
address
),
average_luna_price AS (
SELECT
TRUNC(block_timestamp, 'day') AS date,
AVG(price_usd) AS price_usd
FROM
terra.oracle_prices
WHERE
currency = 'uluna'
GROUP BY 1
)
SELECT
min_date,
COUNT(DISTINCT address) address_count,
price_usd
FROM
new_users u
JOIN
average_luna_price p
ON
p.date = u.min_date
WHERE min_date >= '2021-01-01'
GROUP BY
min_date, price_usd
Run a query to Download Data