query optimization in SQL Server

query optimization in SQL Server