cheeyoung-kekWorm 11
Updated 2022-08-11Copy 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with bridge as (
select
a.block_timestamp::date as date,
tx_hash,
a.from_address as wallet
from ethereum.core.fact_transactions a
where a.to_address = lower('0x3ee18b2214aff97000d974cf647e7c347e8fa585')
and a.origin_function_signature = '0x0f5287b0' AND a.status = 'SUCCESS'
AND date >='2022-01-01'
),
first_transaction as (
select
wallet,
a.tx_hash ,
datediff('day', date, block_timestamp) as Date_Dif
from ethereum.core.fact_transactions a join bridge b on a.from_address = b.wallet
where date > block_timestamp
group by 1,2,3
) ,
second_tranasaction as (
select wallet, tx_hash, min(Date_Dif) from first_transaction
group by 1,2
),
event_function as (
select
a.BLOCK_TIMESTAMP,
a.FROM_ADDRESS,
Run a query to Download Data