Explain how you would write a SQL query to identify anomalous transaction patterns in a high-volume database.