StangFAST05 : Ethereum
Updated 2023-03-08
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 list_event AS
(
SELECT
sum( b.amount_in ) AS sum_in
, sum( b.amount_out ) AS sum_out
, sum( b.amount_in_usd ) AS sum_in_usd
, sum( b.amount_out_usd ) AS sum_out_usd
, sum_in - sum_out AS sum_amount
, sum_in_usd - sum_out_usd AS sum_usd
FROM
ethereum.core.fact_event_logs a
INNER JOIN
ethereum.core.ez_dex_swaps b
ON a.contract_address = b.contract_address
WHERE
a.origin_function_signature = '0x18fccc76'
)
,
list_total_pool AS
(
SELECT
a.pool_name AS pool_name
, count( a.pool_name ) AS count_tx
, sum( a.amount_in_usd ) AS sa_in
, sum( a.amount_out_usd ) AS sa_out
, sa_in - sa_out AS sum_amount_usd
Run a query to Download Data