mz0111Untitled Query
Updated 2022-11-16Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
--credit to alik110
WITH TAB1 AS
(select 'Gains Network' as platform,
origin_from_address,
count (distinct tx_hash) as TX_Count,
sum (event_inputs:value/1e18) as Total_Volume
from polygon.core.fact_event_logs
where origin_to_address in ('0xd8d177efc926a18ee455da6f5f6a6cfcee5f8f58','0x65187fec6ecc4774c1f632c7503466d5b4353db1','0xf8a140db8b05bec52c7e86d0d40d72f8e54fe559')
and origin_function_signature in ('0x9aa7c0e5')
and event_name = 'Transfer'
and event_inputs:from = Origin_From_Address
and contract_address = '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063' -- DAI
and tx_status= 'SUCCESS'
and block_timestamp > '2022-11-07'
group by 1,2
)
select origin_from_address,
Total_Volume
from TAB1
order by 2 desc
limit 10
Run a query to Download Data