kiacryptoTotal fee generated per day
Updated 2022-07-14Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with txs as (
select lending_pool, blockchain, tx_hash
from flipside_prod_db.crosschain.ez_borrowing
union all
select lending_pool, blockchain, tx_hash
from flipside_prod_db.crosschain.ez_lending
)
select date_trunc('day', block_timestamp) as date, lending_pool, sum(tx_fee) as fee, 'Polygon' as type
from polygon.core.fact_transactions t join txs tx on t.tx_hash = tx.tx_hash
where blockchain = 'polygon'
group by 1, 2
union all
select date_trunc('day', block_timestamp) as date, lending_pool, sum(tx_fee) as fee, 'Ethereum' as type
from ethereum.core.fact_transactions t join txs tx on t.tx_hash = tx.tx_hash
where blockchain = 'ethereum'
group by 1, 2
Run a query to Download Data