Custom Query

Members, I would like to create a TSQL similar to 

SELECT SPID, [Last Command], user, [Login Time], [Last Batch] 

FROM [SomeHIstoryTable with crazy joins]

ORDER BY [Login Time]

Anyone have a tools box of DM TSQL queries they could share.

Thank you