Excel → T-SQL › FILTER

Excel FILTER to SQL WHERE

The dynamic array is the query. The test is the WHERE.

SELECT order_id, customer_id, status, order_date, total_amount
FROM Orders
WHERE status = 'Shipped';

FILTER with a second if_empty argument is: run the query, and if zero rows, you handle that in the app.

Canonical translation

SELECT order_id, customer_id, status, order_date, total_amount
FROM Orders
WHERE status = 'Shipped';

Then write it on a ticket

Monday is free. A colleague asks, you type, we mark it.

Clock in free