nimasadjadiBridge destinations events
Updated 2022-07-30Copy 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 eth_user AS
(
SELECT
ORIGIN_FROM_ADDRESS,
TX_HASH,
EVENT_NAME,
BLOCK_TIMESTAMP
FROM ethereum.core.fact_event_logs
WHERE ORIGIN_TO_ADDRESS = '0xa0c68c638235ee32657e8f720a23cec1bfc77c77'
),
First_destination AS (
SELECT
BLOCK_TIMESTAMP,
CONTRACT_NAME,
EVENT_NAME,
TX_HASH,
ORIGIN_FROM_ADDRESS,
ORIGIN_TO_ADDRESS
FROM polygon.core.fact_event_logs
),
combine AS (
SELECT
a.origin_from_address,
b.tx_hash,
b.event_name,
b.contract_name,
b.origin_to_address,
b.block_timestamp
FROM eth_user a INNER JOIN First_destination b ON a.origin_from_address = b.origin_from_address
WHERE b.block_timestamp > a.block_timestamp
),
rank AS (
SELECT
date_trunc('day', block_timestamp) as day,
event_name,
Run a query to Download Data