freemartianFee new
Updated 2022-08-09
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
›
⌄
with deposits as (
select
tx_hash
from ethereum.core.ez_token_transfers
where origin_to_address in ('0x7d2768de32b0b80b7a3454c06bdac94a69ddc7a9', '0x135896de8421be2ec868e0b811006171d9df802a')
and to_address = '0xffc97d72e13e01096502cb8eb52dee56f74dad7b'
and contract_address = '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9'
and block_timestamp > CURRENT_DATE -365
),
withdraws as (
select
tx_hash
from ethereum.core.ez_token_transfers
where origin_to_address in ('0x7d2768de32b0b80b7a3454c06bdac94a69ddc7a9', '0x135896de8421be2ec868e0b811006171d9df802a')
and to_address = '0x0000000000000000000000000000000000000000'
and contract_address = '0xffc97d72e13e01096502cb8eb52dee56f74dad7b'
and block_timestamp > CURRENT_DATE -365
)
select sum(tx_fee) as fee_paid, 'Deposit' as label
from ethereum.core.fact_transactions
where tx_hash in (select tx_hash from deposits)
UNION
select sum(tx_fee) as fee_paid, 'Withdraw' as label
from ethereum.core.fact_transactions
where tx_hash in (select tx_hash from Withdraws)
Run a query to Download Data