Query editor
WITHmonthly_summary as (SELECTdate_trunc('month', evt_block_time) as month,SUM(loan_amount_usd) as amountFROMquery_3015748WHERE loan_amount_original > 0GROUP BY 1)SELECT*FROM(SELECTdate_trunc('month', a.evt_block_time) as month,SUM(cast(a.apr * a.loan_amount_usd as real)/ cast(m.amount as real)/100) as aprFROMquery_3015748 aINNER JOINmonthly_summary mON date_trunc('month', a.evt_block_time) = m.monthWHERE a.loan_amount_usd > 0GROUP BY 1)WHERE month >= CAST('2020-06-01' as timestamp) -- previous month had 1200 apr which messes with the chartORDER BY month DESC