SpecterRevenue 2023-204
Updated 2024-08-03
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 Lastyear AS(
SELECT ROUND (SUM(
CASE
WHEN RENEWAL_COST IS NULL THEN 0
ELSE
RENEWAL_COST
END + LAST_REGISTERED_COST)) AS TotalValue
from ethereum.ens.ez_ens_domains
where LAST_REGISTERED_TIMESTAMP::date >= '2023-01-01' and
LAST_REGISTERED_TIMESTAMP::date <= DATE_TRUNC('day', CURRENT_DATE) - INTERVAL '1 year'
),
Thisyear AS(
SELECT ROUND(SUM(
CASE
WHEN RENEWAL_COST IS NULL THEN 0
ELSE
RENEWAL_COST
END + LAST_REGISTERED_COST)) AS TotalValue
from ethereum.ens.ez_ens_domains
where LAST_REGISTERED_TIMESTAMP::date >= '2024-01-01' and
LAST_REGISTERED_TIMESTAMP::date <= '2024-12-12'
),
Ethprice AS (
SELECT
trunc(hour,'day') as day,
AVG(price) as price_usd
from blast.price.ez_prices_hourly
where symbol='ETH'
group by day
order by day desc
limit 1
)
SELECT '2023' AS Year, TotalValue,
TotalValue * price_usd AS TotalValue_USD
FROM Lastyear, Ethprice
union all
QueryRunArchived: QueryRun has been archived