wheresmadropUntitled Query
Updated 2023-03-04Copy Reference Fork
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 OS AS
(
select date_trunc('week', block_timestamp) as week,
count(distinct tx_hash) as no_of_txns,
sum(price) as eth_volume,
sum(price_usd) as volume,
platform_name,
sum(creator_fee) as eth_fee,
sum(creator_fee_usd) as fee_usd,
count(distinct buyer_address) as no_active_user,
volume / no_active_user as avg_volume_per_user
--sum(price) over (partition by platform_name order by week) as cumulative_volume
from ethereum.core.ez_nft_sales
where platform_name = 'opensea'
and block_timestamp > current_timestamp - interval '3 months'
and event_type = 'sale'
and price is not null
and currency_symbol IN ('ETH', 'WETH')
group by week, platform_name
order by week, platform_name
),
BLUR as
(
select date_trunc('week', block_timestamp) as week,
count(distinct tx_hash) as no_of_txns,
sum(price) as eth_volume,
sum(price_usd) as volume,
platform_name,
sum(creator_fee) as eth_fee,
sum(creator_fee_usd) as fee_usd,
count(distinct buyer_address) as no_active_user,
volume / no_active_user as avg_volume_per_user
--sum(price) over (partition by platform_name order by week) as cumulative_volume
Run a query to Download Data