Date and Time-Based Filters

Use the following examples to apply date and time-based filtering:

-- Validate recent data within business hours

    missing_count(transaction_amount) = 0

-- Filter:

    created_at >= CURRENT_DATE - INTERVAL '7 days' AND EXTRACT(hour FROM created_at) BETWEEN 9 AND 17

-- Check weekend data patterns

    avg(order_amount) between 50 and 200

-- Filter:

    EXTRACT(dow FROM order_date) IN (0, 6)  -- Sunday and Saturday