Apply filters to stream query SQL