Add a Where Clause In a Complex SQL Query : I want to pass a ShowRoomId Value in The Query Below.
The Employees Table Contain ShowRoomId Field
How I can Do It.

My SQL Query

    SELECT * FROM Employees A
OUTER APPLY (SELECT TOP 1 * 
             FROM EmployeeBasics B
             WHERE (A.EmployeeID = B.EmployeeID)
             ORDER BY B.BasicUpdateDate DESC) AS B
OUTER APPLY (
			SELECT C.EmployeeId , count(*) AS TotalAbsent 
			FROM EmployeeAbsents C 	
			WHERE C.AbsentDate BETWEEN '2016-05-01' AND '2016-05-30' AND A.EmployeeID = C.EmployeeID
			GROUP BY C.EmployeeId
            ) AS C
OUTER APPLY (
			SELECT EmployeeId,
				SUM(CASE WHEN TransctionTypeId = 1 THEN Amount ELSE 0 END) AS Payment, 
				SUM(CASE WHEN TransctionTypeId = 2 THEN Amount ELSE 0 END) AS RecoverSalary, 
				SUM(CASE WHEN TransctionTypeId = 3 THEN Amount ELSE 0 END) AS RecoverCash
			FROM dbo.EmployeeAdvances D
			WHERE A.EmployeeID = D.EmployeeID
			GROUP BY EmployeeId
			) AS D