amelia-leeUntitled Query
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
29
30
31
32
33
34
35
36
›
⌄
With eth_txn as (
select
origin_from_address,
tx_hash,
block_timestamp
from ethereum.core.fact_event_logs
where (ORIGIN_TO_ADDRESS=lower('0x401f6c983ea34274ec46f84d70b31c151321188b') or
ORIGIN_TO_ADDRESS=lower('0xa0c68c638235ee32657e8f720a23cec1bfc77c77'))
-- plasma or hop
),
poly_txn as (
SELECT
block_timestamp,
event_name,
contract_address,
origin_from_address,
origin_to_address,
tx_hash
FROM polygon.core.fact_event_logs
),
txn_bridge as (
SELECT
b.tx_hash,
b.event_name,
c.address_name,
a.origin_from_address,
b.origin_to_address,
b.block_timestamp as date
FROM eth_txn a
INNER JOIN poly_txn b
ON a.origin_from_address = b.origin_from_address
join polygon.core.dim_labels c on b.contract_address=c.address
WHERE b.block_timestamp > a.block_timestamp
),
Run a query to Download Data