Who are these scripts for? You need to troubleshoot performance problems with SQL Server, and you need to do it now. You don't have time to track down a bunch of DMVs, figure out Extended Events, ...
select * from pa.pa_transaction_interface_all where batch_name = 'AP-123456'; select * from pa.pa_transaction_interface_all order by creation_date desc; select * from pa.pa_transaction_interface_all ...