/*
this works in Azure SQL
read here for reference end example
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-xevent-code-ring-buffer
*/
SELECT top 100
QS.last_execution_time
,SUBSTRING(ST.text, (QS.statement_start_offset/2) + 1
,((CASE statement_end_offset WHEN -1 THEN DATALENGTH(ST.text) ELSE QS.statement_end_offset END - QS.statement_start_offset)/2) + 1) AS statement_text
FROM sys.dm_exec_query_stats AS QS
CROSS APPLY sys.dm_exec_sql_text(QS.sql_handle) AS ST
ORDER BY qs.last_execution_time DESC