shreexDaily Sales Volume USD and Sales Count for NFT Sales On Polygon
Updated 2022-07-16
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
›
⌄
select
date_trunc('day',block_timestamp) as date,
sum(raw_amount)/pow(10,18) * (max(price)) as volume_usd,
-- decimals for weth and dai is 18
count(*) as sales
from polygon.core.fact_token_transfers
left join ethereum.core.fact_hourly_token_prices on hour=block_timestamp
where origin_from_address='0x9b814233894cd227f561b78cc65891aa55c62ad2'
and from_address != '0xf715beb51ec8f63317d66f491e37e7bb048fcc2d'
and to_address != '0xf715beb51ec8f63317d66f491e37e7bb048fcc2d' and contract_address = '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619' and token_address='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
GROUP BY date
UNION ALL
select
date_trunc('day',block_timestamp) as date,
sum(raw_amount)/pow(10,18) as volume_usd,
-- decimals for weth and dai is 18
count(*) as sales
from polygon.core.fact_token_transfers
where origin_from_address='0x9b814233894cd227f561b78cc65891aa55c62ad2'
and from_address != '0xf715beb51ec8f63317d66f491e37e7bb048fcc2d'
and to_address != '0xf715beb51ec8f63317d66f491e37e7bb048fcc2d' and contract_address = '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063'
GROUP BY date
order by date
--0x8f3cf7ad23cd3cadbd9735aff958023239c6a063 dai 0x7ceb23fd6bc0add59e62ac25578270cff1b9f619 weth
Run a query to Download Data