StangFAST03 - Total weekly
Updated 2023-04-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 near_price AS
(
SELECT
date_trunc( 'week' , a.timestamp ) AS date
, avg( a.price_usd ) AS price
FROM
near.core.fact_prices a
WHERE
a.symbol = 'wNEAR'
GROUP BY
1
ORDER BY
1 DESC
)
SELECT
date_trunc( 'week' , a.block_timestamp ) AS day
, CASE
when a.tx_receiver LIKE '%mintbase1.near' then 'Mintbase'
when a.tx_receiver LIKE '%fewandfar.near' then 'Few and Far'
when a.tx_receiver IN ( 'comic.paras.near' , 'x.paras.near' ) then 'Paras'
END AS " NFT marketplace "
, CASE when " NFT marketplace " = 'Paras' then b.price END AS " NEAR price "
, count( DISTINCT a.tx_hash ) AS total_tx
, sum( total_tx ) over ( PARTITION BY " NFT marketplace " ORDER BY day ASC ) AS cumulative_total_tx
Run a query to Download Data