winnie-fsbase query
    -- Base query without parameters (save as 'klend_volume_base')
    with Deposit as (
    select
    tx_id,
    block_timestamp,
    signers [0] as Depositor,
    DECODED_INSTRUCTION:accounts [3] :pubkey :: string as lendingMarketAuthority
    from
    solana.core.fact_decoded_instructions
    where
    program_id = 'KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD'
    and event_type = 'depositReserveLiquidityAndObligationCollateral'
    group by
    1, 2, 3, 4
    ),
    prices as (
    select
    date_trunc(day, hour) as date,
    TOKEN_ADDRESS,
    SYMBOL,
    avg(price) as price
    from
    solana.price.ez_prices_hourly
    group by
    1, 2, 3
    ),
    Deposit_Volume as (
    select
    date_trunc(day, fact_transfers.block_timestamp) as date,
    sum(AMOUNT * price) as DepositVolume
    from
    solana.core.fact_transfers
    join Deposit on fact_transfers.tx_id = Deposit.tx_id
    and fact_transfers.block_timestamp :: date = Deposit.block_timestamp :: date
    and fact_transfers.tx_from = Deposit.Depositor
    and fact_transfers.tx_to = Deposit.lendingMarketAuthority
    Run a query to Download Data