Query editor
SELECTDATE (b.evt_block_time) AS date,b.contract_address, --- the address of the contract that emitted the borrow eventb.evt_tx_hash,b.amount,b.borrowRate,borrowRate/1e27 AS normalized_borrow_rate,b.interestRateMode,b.reserve AS borrowed_token, --- the token being borrowedb.user AS borrower, --- the user who is taking the debtb.amount / POWER(10, tb.decimals) AS amount_token, -- normalized token amount(b.amount / POWER(10, tb.decimals)) * pb.price AS amount_usd, -- USD amounttb.name AS token_name,tb.symbol AS token_symbol,tb.decimals AS token_decimalsFROMtydro_ink.l2poolinstance_evt_borrow bLEFT JOINtokens.erc20 tb --- token metadata joinON b.reserve = tb.contract_addressAND tb.blockchain = 'ink'LEFT JOIN prices.day pbON b.reserve = pb.contract_addressAND DATE(b.evt_block_time) = DATE(pb.timestamp)AND pb.blockchain = 'ink'WHEREb.evt_block_time >= NOW() - INTERVAL '30' DAYORDER BYdate DESC;