rackhaelDaily Unique Users (last 60 days) / Solana Lending Protocol Comparison copy
    Updated 2023-02-17
    -- forked from b98e04fb-98dd-42d1-8982-965d79ce7682

    select DATE_TRUNC('day', Block_Timestamp::date) as day,
    CASE when instructions::string like '%So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo%' then 'Solend'
    when instructions::string like '%7Zb1bGi32pfsrBkzWdqd4dFhUXwp5Nybr1zuaEwN34hy%' then 'Larix'
    when instructions::string like '%JPv1rCqrhagNNmJVM5J1he7msQ5ybtvE1nNuHpDHMNU%' then 'Jet'
    when instructions::string like '%Port7uDYB3wk6GJAw4KT1WpTeMtSu9bTcChBHkX2LfR%' then 'Port'
    when instructions::string like '%SHARKobtfF1bHhxD2eqftjHBdVSCbKo9JtgK71FhELP%' then 'Sharky'
    else null end as lending_project,
    count(distinct signers[0]) as dau
    from solana.core.fact_transactions
    where (instructions::string like '%So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo%' OR
    instructions::string like '%7Zb1bGi32pfsrBkzWdqd4dFhUXwp5Nybr1zuaEwN34hy%' OR
    instructions::string like '%JPv1rCqrhagNNmJVM5J1he7msQ5ybtvE1nNuHpDHMNU%' OR
    instructions::string like '%Port7uDYB3wk6GJAw4KT1WpTeMtSu9bTcChBHkX2LfR%' OR
    instructions::string like '%SHARKobtfF1bHhxD2eqftjHBdVSCbKo9JtgK71FhELP%' )
    and Block_Timestamp between DATE_TRUNC('day', CURRENT_DATE - interval '60 days')
    and DATE_TRUNC('day', CURRENT_DATE - interval '1 days')
    group by 1, 2 order by day DESC;




    Run a query to Download Data