Anomaly detection on a time series: score recent periods against history with BigQuery AI.DETECT_ANOMALIES (TimesFM). Give one table and its latest periods are scored against its own history, or a history and a target table. Returns every checked row with bounds, anomaly flag and probability, plus the anomaly count. Input: history_table, target_table, timestamp_col, data_col; optional target_last, threshold, id_cols.