bachifees kashi ethereum
Updated 2022-07-13
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
›
⌄
with borrows as (
select
a.lending_pool as kashi_market,
sum(b.tx_fee) as total_fee,
avg(b.tx_fee) as avg_fee
from flipside_prod_db.crosschain.ez_borrowing a
join ethereum.core.fact_transactions b
on a.tx_hash=b.tx_hash
where a.blockchain = 'ethereum'
and a.lending_pool like '%km%'
group by kashi_market
order by total_fee desc
),
lendings as (
select a.lending_pool as kashi_market,
sum(b.tx_fee) as total_fee,
avg(b.tx_fee) as avg_fee
from flipside_prod_db.crosschain.ez_lending a
join ethereum.core.fact_transactions b
on a.tx_hash=b.tx_hash
where a.blockchain = 'ethereum'
and a.lending_pool like '%km%'
group by kashi_market
order by total_fee desc --limit 10
)
select a.kashi_market, round((a.total_fee + b.total_fee),2) as fees from borrows a
join lendings b on a.kashi_market = b.kashi_market order by fees desc --limit 10
Run a query to Download Data