with
deposit as (
select tx_id,Block_TimeStamp ::DATE Block_TimeStamp,supplied_usd volume from aave.deposits where block_timestamp::date > current_date-365
)
,rpdeposit as (
select month( ts.Block_TimeStamp)month,monthname( ts.Block_TimeStamp)month_name ,avg(volume) as volume ,avg(gas_price)/1e9 as av_gas from
ethereum.transactions ts
JOIN
deposit
on ts.tx_id=deposit.tx_id
group by month,month_name
)
select * from rpdeposit order by month