glxyresearchMEV + Tips (For Lambda Function) copy
Updated 2024-08-14Copy 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
›
⌄
-- forked from MEV + Tips (For Lambda Function) @ https://flipsidecrypto.xyz/studio/queries/1ec9ea8b-8477-4805-a733-4d55c37673e0
WITH blocks AS (
SELECT
block_number,
miner
FROM ethereum.core.fact_blocks
WHERE miner = LOWER('0x810346BD5f860ceEB47133FEf6E33Aed92218178')
),
transaction AS (
SELECT
block_number,
from_address,
to_address,
value_precise
FROM ethereum.core.fact_transactions
WHERE origin_function_signature = '0x'
),
transactions_filtered AS (
SELECT
block_number AS block,
block_timestamp AS timestamp
FROM ethereum.core.fact_transactions
GROUP BY block, timestamp
),
joint_data AS (
SELECT
b.block_number AS block,
t.value_precise AS mev_reward_for_block,
tf.timestamp AS block_time,
b.miner
FROM blocks b
JOIN transaction t ON b.block_number = t.block_number AND t.from_address = b.miner
QueryRunArchived: QueryRun has been archived