Rishabh-Pandey
Databricks MVP

Top keyword is not supported so in place of that you can do one thing order your data in desc and then use the limit 1 in last it will give only the max record so you can modify your query according to that

Rishabh Pandey