SQL queries for System Center Operations Manager (TSQL)