mo115tot
Updated 2023-01-13
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 flows as(with flowprice as(
select
date_trunc('day',RECORDED_HOUR) as pdate,
avg(close) as flow_price
from flow.core.fact_hourly_prices
where token ilike 'flow'
and pdate >= '2022-12-01'
group by 1),
flow as(
select
date_trunc('day',block_timestamp) as fdate,
count(distinct tx_id) as flow_tx_count,
count(distinct seller) as flow_seller,
count(distinct buyer) as flow_buyer,
sum(price) as flow_nft
from flow.core.ez_nft_sales
where block_timestamp >= '2022-12-01'
and TX_SUCCEEDED = 'TRUE'
group by 1)
select
fdate ,
flow_tx_count,
flow_seller,
flow_buyer,
flow_nft*(flow_price) as flow_nft_value
from flow join flowprice on fdate=pdate
),
eth as (
select
date_trunc('day',block_timestamp) as edate,
count(distinct tx_hash) as eth_tx_count,
count(SELLER_ADDRESS) as eth_seller,
count(distinct BUYER_ADDRESS) as eth_buyer,
sum(PRICE_USD) as eth_NFT_value
from ethereum.core.ez_nft_sales
where EVENT_TYPE = 'sale'
Run a query to Download Data