mucryptoS3 Q10
Updated 2023-01-24
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 top5 as
(select
-- count(tx_hash) as n_txs,
-- count(distinct tx_hash) as n_distinct_txs,
currency_symbol,
tx_hash
-- avg(price_usd) as avg_price
from ethereum.core.ez_nft_sales
where date_trunc('month',block_timestamp) = '2022-12-01'
and currency_symbol is not NULL
and price_usd is not null),
-- group by currency_symbol
-- order by n_distinct_txs desc),
prices as
(select symbol,
-- hour::DATE as _date,
price
from ethereum.core.fact_hourly_token_prices
where date_trunc('month',hour) = '2022-12-01'
-- group by symbol, price
)
select
CASE
when currency_symbol = 'ETH' then currency_symbol
when currency_symbol = 'WETH' then currency_symbol
when currency_symbol = 'GALA' then currency_symbol
when currency_symbol = 'nftx_token' then currency_symbol
when currency_symbol = 'USDC' then currency_symbol
else 'Other'
end as "Currency_symbol",
count(tx_hash) as n_txs,
count(distinct tx_hash) as n_distinct_txs,
-- n_distinct_txs,
currency_symbol,
Run a query to Download Data