elsina Who made the most profit?
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
29
30
›
⌄
with nfts_contract as (
select address, project_name
from polygon.core.dim_labels
where project_name ilike '%nft%' or project_name ilike '%opensea%'
),
txs as (
select tx_hash as tx
from polygon.core.fact_event_logs, nfts_contract
where address = contract_address
),
amount as (
select to_address as addr, -sum(matic_value) as volume
from polygon.core.fact_transactions, txs
where tx_hash = tx
group by 1
union all
select from_address as addr, sum(matic_value) as volume
from polygon.core.fact_transactions, txs
where tx_hash = tx
group by 1
)
(
select addr, volume
from amount
order by 2 desc
limit 100
)
Run a query to Download Data