--select date_trunc('day', block_timestamp) as day,
SELECT TX_ID AS address,
count (case when program_id ilike 'So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo' then 1 end) as Solend_Protocol
from solana.core.fact_events
--FROM solana.core.fact_transfers
--where day >= '2022-06-01'
--and succeeded = 'TRUE'
group by address
limit 10