zakkisyedUntitled Query
Updated 2022-01-11
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
›
⌄
⌄
/* checking for addliquidity function in other tables
select *
from ethereum.transactions
where to_label = 'sushiswap'
or from_label = 'sushiswap'
and function_name = 'addLiquidity'
limit 100
*/
select T1.POOL_NAME, sum(T1.usd_amt_in - T2.usd_amt_out)
from
(
select pool_name, sum(amount_usd) as usd_amt_in
from ethereum.dex_swaps
where platform = 'sushiswap'
and direction = 'IN'
and amount_usd != 0
group by 1
) as T1
Run a query to Download Data