granadohoAdd Liquidity
Updated 2022-02-04
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 pools as (
select
pool_name,
pool_address
from ethereum.dex_liquidity_pools
where platform = 'sushiswap'
), price as (
select
*
from (
select
price,
symbol,
ROW_NUMBER() OVER (PARTITION by symbol order by hour desc) col
from ethereum.token_prices_hourly
where date(hour) = current_date
) a
where a.col = 1
), add_liquidity as (
select
c.block_timestamp,
c.tx_id,
d.success,
c.origin_function_signature,
c.origin_function_name,
c.from_address,
a.pool_name,
a.pool_address,
c.amount,
b.symbol,
c.amount * b.price as amount_usd
from ethereum.udm_events c
inner join pools a
on c.to_address = a.pool_address
inner join price b
on b.symbol = c.symbol
Run a query to Download Data