elsinaTotal fees and number of tx collected by opensea
Updated 2022-08-02
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 price as (
select
hour::date as d,
symbol,
avg(price) as price
from ethereum.core.fact_hourly_token_prices
where
hour::date >= '2022-06-01' and
symbol in ('REVV', 'WETH')
group by 1, 2
),
-- credit smbanaie
currency as (
select
count(*) as "count",
sum((raw_amount/pow(10, 18)) * price) as fees,
'WETH' as currency
from
polygon.core.fact_token_transfers, price
where
origin_to_address = '0xf715beb51ec8f63317d66f491e37e7bb048fcc2d' and --- Contract Address
to_address in ('0x8de9c5a032463c561423387a9648c5c7bcc5bc90', '0x5b3256965e7c3cf26e11fcaf296dfc8807c01073') and --- Polygon Fee Collectors for OpenSea
origin_function_signature = '0xbbbfa60c' and
contract_address = '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619' and
block_timestamp::date = d and
symbol = 'WETH'
union all
select
count(*) as "count",
sum((raw_amount/pow(10, 18))) as fees,
'DAI' as currency
from
polygon.core.fact_token_transfers
where
Run a query to Download Data