StangFAST001 - overview [ number ]
    Updated 2023-09-19
    -- forked from 001 - overview @ https://flipsidecrypto.xyz/edit/queries/6ffe39ae-093c-456c-8308-687750d5d4cb

    --- owner ? -- 5D9yi4BKrxF8h65NkVE1raCCWFKUs5ngub2ECxhvfaZe
    --- [ tx_from ] -- 5PbUoBaCe5Ppuiv6DZkYn6qUY3VSFdmoNRgkwmLMQt9y


    --- [1] LenderDeposit
    --- [1] LenderInitialize --- lend
    --- [2] WithdrawalRequestExecute --- withdraw

    --- [3] LoanDrawdown --- burrow
    --- [4] LoanMakePayment --- repay


    with

    final AS
    (
    SELECT
    a.block_timestamp AS dt
    , a.tx_id AS tx
    , a.signers[0] AS sg

    , case
    when a.log_messages[1] LIKE 'Program log: Instruction: %' then split( a.log_messages[1] , 'Program log: Instruction: ' )[1]
    when a.log_messages[2] LIKE 'Program log: Instruction: %' then split( a.log_messages[2] , 'Program log: Instruction: ' )[1]
    when a.log_messages[3] LIKE 'Program log: Instruction: %' then split( a.log_messages[3] , 'Program log: Instruction: ' )[1]
    when a.log_messages[4] LIKE 'Program log: Instruction: %' then split( a.log_messages[4] , 'Program log: Instruction: ' )[1]
    when a.log_messages[5] LIKE 'Program log: Instruction: %' then split( a.log_messages[5] , 'Program log: Instruction: ' )[1]
    end
    AS ac

    , d.amount AS am
    , d.mint AS mn
    , e.symbol AS sb
    Run a query to Download Data