mohamadreza221166daily unique users on solend
    Updated 2022-08-02
    WITH solend_events AS(
    SELECT BLOCK_TIMESTAMP, VALUE AS wallet_account
    FROM solana.core.fact_events, table (flatten (input=> INSTRUCTION:accounts))
    WHERE PROGRAM_ID = 'So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo'
    AND SUCCEEDED = TRUE
    )

    SELECT date_trunc('day', BLOCK_TIMESTAMP) AS days, COUNT(DISTINCT wallet_account) AS "total unique users"
    FROM solend_events
    GROUP BY 1
    ORDER BY 1
    Run a query to Download Data