How would you go about getting the most recent date from a table? I've been trying to use the clause order by but I get back the following error: "An error occurred while checking the query syntax. Errors: The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP, OFFSET or FOR XML is also specified."
FROM Account_Salesforce B
Inner JOIN Contact_Salesforce A
ON A.AccountId = B.Id
Left Join Movimento__c_Salesforce C
on C.Cliente__c = B.Id
WHERE B.KPIUltimoSoggiornoAnno__c >= 2021
ORDER BY C.Data_Inserimento__c desc