jackguyadseoqh24102hen
Updated 2022-07-08
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
›
⌄
SELECT
date_trunc('day', block_timestamp),
ADDRESS_NAME,
count(DISTINCT tx_hash) as swaps,
count(DISTINCT ORIGIN_FROM_ADDRESS) as swappers
FROM polygon.core.fact_event_logs
LEFT outer JOIN flipside_prod_db.crosschain.address_labels
ON contract_address = address
WHERE tx_hash IN (
SELECT DISTINCT tx_hash
FROM polygon.core.fact_event_logs
WHERE event_name LIKE 'Swap'
-- AND origin_function_signature LIKE '0x13dcfc59'
)
AND address_name IN (
SELECT address_name FROM(
SELECT
ADDRESS_NAME,
count(DISTINCT tx_hash) as swaps
FROM polygon.core.fact_event_logs
LEFT outer JOIN flipside_prod_db.crosschain.address_labels
ON contract_address = address
WHERE tx_hash IN (
SELECT DISTINCT tx_hash
FROM polygon.core.fact_event_logs
WHERE event_name LIKE 'Swap'
-- AND origin_function_signature LIKE '0x13dcfc59'
)
AND event_name LIKE 'Transfer'
AND not address_name is NULL
GROUP by 1
ORDER BY 2 DESC
LIMIT 10
)
)
AND event_name LIKE 'Transfer'
Run a query to Download Data