amelia-leeUntitled Query
Updated 2022-07-30
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
event_name
,sum(tx_count) as tx_count
from (select
date_trunc('day', block_timestamp) as day
,event_name
,count(DISTINCT tx_hash) as tx_count
,sum(tx_count) over(partition by event_name order by day) as growth_count
,RANK() OVER (PARTITION by day order by tx_count DESC) as value_check
from (select
a.origin_from_address
,b.tx_hash
,b.event_name
,b.contract_name
,b.origin_to_address
,b.block_timestamp
from (select
origin_from_address
,tx_hash
,block_timestamp
from ethereum.core.fact_event_logs
where origin_to_address = '0xa0c68c638235ee32657e8f720a23cec1bfc77c77') a inner join ( select
origin_from_address
,origin_to_address
,tx_hash
,block_timestamp
,event_name
,contract_name
from polygon.core.fact_event_logs) b on a.origin_from_address = b.origin_from_address
where b.block_timestamp > a.block_timestamp)
where event_name is not NULL
group by 1,2)
where value_check <= 10
group by 1
Run a query to Download Data