Use the WHERE clause in an APPLY statement to filter out source rows.
The WHERE clause is an optional part of the SELECT clause in an APPLY statement. It acts as a filter, determining which of the rows put into the data stream by the producer operator(s) will be kept in the data stream and delivered to the consumer operator(s). The decision whether or not to keep each row is based on condition(s) specified in the WHERE clause.
The conditional expression in a WHERE clause consists of simple predicates combined with logical ANDs and ORs. Any value in a predicate can be specified by a CASE value expression.
The following is an example of a WHERE clause:
WHERE ( Years_In_Business > 5 AND Gross_Sales > 100000000 ) OR Company_Name = 'Excellent Software, Inc.'