SalehEposh4 Sum copy
    Updated 2024-08-26
    -- forked from damidez / Eposh4 Sum @ https://flipsidecrypto.xyz/damidez/q/DVGqxiEeO6Im/eposh4-sum

    WITH SolayerEposh AS (
    SELECT
    BLOCK_TIMESTAMP,
    tx_id,
    signers[0] AS authority,
    instruction.value:parsed.info.mint::string AS LST,
    instruction.value:parsed.info.amount::numeric / 1000000000 AS Adjusted_amount
    FROM
    solana.core.fact_events,
    TABLE(FLATTEN(input => INNER_INSTRUCTION:instructions)) AS instruction
    WHERE
    program_id = 'sSo1iU21jBrU9VaJ8PJib1MtorefUV4fzC9GURa2KNn'
    AND instruction.value:parsed.type::string = 'mintTo'
    AND BLOCK_TIMESTAMP >= '2024-06-01'
    AND SUCCEEDED = 'TRUE'
    )
    SELECT COUNT(DISTINCT authority) AS Depositors,
    ROUND(SUM(Adjusted_amount)) AS TotalSolDeposited,
    ROUND(AVG(Adjusted_amount)) AS AvgDeposited
    FROM SolayerEposh


    QueryRunArchived: QueryRun has been archived