SELECT
block_timestamp,
tx_id,
event_attributes:"0_borrower"::string as borrower,
event_attributes:"0_action"::string as contract_event,
event_attributes:"0_amount" / POW(10,6) as bLUNA_liquidated,
event_attributes:"1_repay_amount" / POW(10,6) as UST_repaid
FROM terra.msg_events
WHERE tx_id = '8C13DB48A4786B739497D5C50061BA4EBE7A95AE5BA0C6E5B6C0EFE87AD8DB41'
and event_type = 'from_contract'