hessTotal Daily Volume per Blockchain
Updated 2022-06-13Copy 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
›
⌄
with flow as ( select date(BLOCK_TIMESTAMP) as date , count(DISTINCT(BUYER)) as unique_buyer , sum(unique_buyer) over (order by date asc) as cum_user, sum(price) as volume
from flow.core.fact_nft_sales
where block_timestamp::date >= '2022-05-09'
group by 1
order by 1)
,
ethereum as (select date(BLOCK_TIMESTAMP) as date , count(DISTINCT(BUYER_ADDRESS)) as unique_buyer , sum(unique_buyer) over (order by date asc) as cum_user
, sum(PRICE_USD) as volume
from ethereum.core.ez_nft_sales
where block_timestamp::date >= '2022-05-09'
group by 1
order by 1)
,
price as (select date(hour) as price_date , case when token_address = lower('0xD31a59c85aE9D8edEFeC411D448f90841571b89c') then 'SOL' end as token , avg(price) as price
from flipside_prod_db.ethereum_core.fact_hourly_token_prices
where token_address = lower('0xD31a59c85aE9D8edEFeC411D448f90841571b89c') and hour::date >= '2022-05-09'
group by 1,2)
,
solana as (select date(BLOCK_TIMESTAMP) as date , count(DISTINCT(PURCHASER)) as unique_buyer , sum(unique_buyer) over (order by date asc) as cum_user
, sum(SALES_AMOUNT*price) as volume
from solana.core.fact_nft_sales a join price b on a.BLOCK_TIMESTAMP::date = b.price_date
where block_timestamp::date >= '2022-05-09'
group by 1
order by 1)
select 'Flow' as blockchain , date , unique_buyer , cum_user, volume
from flow
UNION
select 'Ethereum' as blockchain , date , unique_buyer , cum_user, volume
from ethereum
UNION
select 'Solana' as blockchain , date , unique_buyer , cum_user, volume
from solana
Run a query to Download Data