SELECT
Date_trunc('day',borrows.block_timestamp) AS day,AVG(borrows.loan_amount_usd)AS Averagedaily_loan,
AVG(deposits.supplied_base_asset_usd)AS Averagedaily_deposit
FROM ethereum.compound.ez_borrows borrows
JOIN ethereum.compound.ez_deposits deposits
ON borrows.TX_Hash = deposits.TX_Hash
GROUP by day