alirsopensea fees -part-04
Updated 2022-08-01
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
CONCAT(RANK() OVER(ORDER BY n_tx DESC), '- ', to_address) as to_address,
n_tx
FROM (
SELECT
to_address,
COUNT(tx_id) as n_tx
FROM (
SELECT
TRUNC(block_timestamp, 'day') as date,
tx_id,
event_inputs:to::string as to_address,
MAX(IFF(event_inputs:tokenId IS NOT NULL, contract_address, '')) as contract_address,
MAX(IFF(event_inputs:tokenId IS NOT NULL, event_inputs:tokenId, -1)) as token_id
FROM
polygon.events_emitted
WHERE
tx_to_address = '0xf715beb51ec8f63317d66f491e37e7bb048fcc2d' --opensea contract
AND event_name = 'Transfer'
AND contract_name = 'weth'
AND event_inputs:from = '0xf715beb51ec8f63317d66f491e37e7bb048fcc2d'
AND date>='2022-01-01'
GROUP BY 1,2,3
)
GROUP BY 1
ORDER BY 2 DESC
LIMIT 9
)
Run a query to Download Data