SELECT ORIGIN_FUNCTION_NAME,EVENT_NAME,min(tx_id),count(tx_id) as count,RANK() over(order by count desc) as " rank"
FROM flipside_prod_db.ethereum.udm_events
WHERE SYMBOL= 'DAI'
AND DATEDIFF (day, block_timestamp, CURRENT_DATE()) <100
group by ORIGIN_FUNCTION_NAME,EVENT_NAME
having count > 1000
order by count desc
limit 10