查詢最後SQL語法 , 並抓出已列印+按照時間排序

SELECT SUBSTRING(qt.TEXT, (qs.statement_start_offset/2)+1,
((CASE qs.statement_end_offset
WHEN -1 THEN DATALENGTH(qt.TEXT)
ELSE qs.statement_end_offset
END - qs.statement_start_offset)/2)+1) as qu,
qs.last_execution_time
FROM sys.dm_exec_query_stats qs
CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) qt
CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) qp
WHERE (qt.text LIKE '%已列印%' and qt.text LIKE '%update%') and (NOT (qt.text LIKE '%select%') and NOT qt.text LIKE '%@%') and (last_execution_time >= CONVERT(datetime, convert(varchar(10), GETDATE() ,120), 120))
ORDER BY qs.last_execution_time DESC
2019-07-04T22:21:36+08:00