Updated 2023-08-07
999
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
›
⌄
-- forked from 01 - overview chart cop copy @ https://flipsidecrypto.xyz/edit/queries/1c80e327-17e6-4bcc-b5c3-ac5d49fdaba9
-- forked from 01 - overview chart cop @ https://flipsidecrypto.xyz/edit/queries/1036f98e-ff01-4564-a729-0437900904ca
-- forked from 01 - overview chart @ https://flipsidecrypto.xyz/edit/queries/b19dde6e-0fa8-4ede-b496-b87d2492f216
--- magic eden v2
--- tensorswap
with
sol_price AS
(
SELECT
date_trunc( 'day' , a.recorded_hour ) AS day
, avg( a.close ) AS price
, a.symbol AS token
FROM
solana.core.fact_token_prices_hourly a
WHERE
a.symbol = 'SOL'
GROUP BY 1 , 3
ORDER BY 1 DESC
)
,
final AS
(
SELECT
date_trunc( '{{period}}' , a.block_timestamp ) AS "date"
, count( DISTINCT a.purchaser ) AS "buyers"
, count( DISTINCT a.seller ) AS "seller"
, count( DISTINCT a.tx_id ) AS "transaction"
, sum( a.sales_amount * c.price ) AS "usd volume"
Run a query to Download Data