mlhUntitled Query
Updated 2022-07-15Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
SELECT
date,
COUNT(DISTINCT from_address) as count_of_buyers,
COUNT(DISTINCT to_address) as count_of_sellers,
SUM(weth) as volume
FROM (SELECT date_trunc('month', block_timestamp) as date,
tx_id,
EVENT_INPUTS:from as from_address,
EVENT_INPUTS:to as to_address,
EVENT_INPUTS:value / 1e18 as weth,
CONTRACT_ADDRESS as collection_id,
CONTRACT_NAME as collection_name
FROM flipside_prod_db.polygon.events_emitted
WHERE TX_TO_ADDRESS = '0xf715beb51ec8f63317d66f491e37e7bb048fcc2d'
and EVENT_NAME = 'Transfer'
and (from_address <> '0xf715beb51ec8f63317d66f491e37e7bb048fcc2d'
and to_address <> '0xf715beb51ec8f63317d66f491e37e7bb048fcc2d')
and weth < 100000
and TX_SUCCEEDED = 'TRUE')
WHERE date > CURRENT_DATE - 365
GROUP BY 1
Run a query to Download Data