mb1124Amount of DAI borrowed
Updated 2022-08-25
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
WITH wethDeposits AS (
SELECT tx_hash, block_timestamp, depositor,
amount_deposited as weth_deposited
FROM ethereum.maker.ez_deposits
WHERE
token_deposited='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' AND
tx_hash IN (SELECT tx_hash FROM ethereum.maker.ez_vault_creation)
)
, borrowed AS( SELECT tx_hash, amount AS daiBorrowed
FROM ethereum.core.ez_token_transfers
WHERE tx_hash IN (SELECT tx_hash FROM wethDeposits)
AND contract_address='0x6b175474e89094c44da98b954eedeac495271d0f'
AND from_address='0x0000000000000000000000000000000000000000'
)
SELECT block_timestamp,
depositor,
daiBorrowed
FROM wethDeposits wd INNER JOIN Borrowed b ON wd.tx_hash=b.tx_hash
Run a query to Download Data