sidlly-ethMoD analyze
Updated 2024-06-20
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 play AS(
SELECT
SUM(nt.amount_precise) AS amount,
SUM(tx.tx_fee_precise) AS fee
FROM
blast.core.ez_native_transfers AS nt
INNER JOIN blast.core.fact_transactions AS tx ON nt.tx_hash = tx.tx_hash
WHERE
nt.from_address IN ({{PLAYERS}})
AND nt.to_address IN (
LOWER('0x693B37a9859Ce9465Fb2aAdeB03811a26A0c37C0'),
LOWER('0xA56A95F41e64Bc76CDE7423aB2A2ee1763bD8Bcc')
)
),
payout AS (
SELECT
SUM(nt.amount_precise) AS amount,
SUM(tx.tx_fee_precise) AS fee
FROM
blast.core.ez_native_transfers AS nt
INNER JOIN blast.core.fact_transactions AS tx ON nt.tx_hash = tx.tx_hash
WHERE
nt.to_address IN ({{PLAYERS}})
AND nt.from_address IN (
LOWER('0x693B37a9859Ce9465Fb2aAdeB03811a26A0c37C0'),
LOWER('0xA56A95F41e64Bc76CDE7423aB2A2ee1763bD8Bcc')
)
)
SELECT
play.amount as play_amount,
play.fee as enter_fee,
payout.amount as payout_amount,
payout.fee as claim_fee,
(payout_amount - play_amount - enter_fee - claim_fee) as pnl
FROM
play,
QueryRunArchived: QueryRun has been archived