2025 SQL improvements

The following SQL improvements were introduced in 2025:

Date releasedImprovementImpact
December 2025New vector aggregate functions: VECTOR_SUM, VECTOR_MIN, VECTOR_MAX, and VECTOR_AVG.You can perform element-wise aggregations across columns of VECTOR values, simplifying machine learning and data science workflows that compute centroids, ranges, or averages over vector embeddings.
December 2025The AI_REDACT Cortex AI function is now generally available. AI_REDACT detects and redacts personally identifiable information (PII) in unstructured text using a large language model.You can redact PII (names, addresses, emails, and so on) inline in SQL pipelines without integrating an external service.
November 2025The following Cortex AI SQL functions are now generally available: AI_COMPLETE, AI_CLASSIFY, AI_TRANSCRIBE, AI_EMBED, and AI_SIMILARITY.You can use general-purpose, classification, transcription, embedding, and similarity AI functions in production SQL workloads over text, image, and audio inputs.
October 2025Directed joins are now generally available and are no longer in preview. You can enforce join ordering when you run a query with the JOIN clause by adding the DIRECTED keyword.You can more easily migrate workloads into Snowflake that have join order directives and possibly improve performance by scanning joined tables in a specific order.
October 2025In PIVOT queries, you can use the AS clause to specify aliases for the pivot column names. In UNPIVOT queries, you can use the AS clause to specify aliases for column names that appear in the result of the UNPIVOT operation.The AS clause makes it easier to customize column names that appear in the output for PIVOT and UNPIVOT operations.
October 2025You can use the WHEN MATCHED ... THEN ALL BY NAME and WHEN NOT MATCHED ... THEN ALL BY NAME subclauses in the MERGE command to update or insert all columns in the target table with changes from the source.When the target table and the source have the same number of columns and the same names for these columns, you can use these subclauses to avoid maintaining column lists in the INSERT and UPDATE clauses of MERGE statements.
September 2025The FILE data type is now generally available and is no longer in preview. You can also use the TO_FILE function to construct FILE values from staged files.You can store references to files in tables and pass them to AI functions for multimodal workflows without duplicating the file content.
September 2025New SYS_CONTEXT function for retrieving context information about the current application, environment, session, and organization.You can determine, for example, whether an application role is activated, identify the client or driver calling the function, or check whether the function is being called by a person, task, or SPCS service.
September 2025You can use the RESAMPLE clause and a set of interpolation functions to fill gaps in time-series data.This SQL functionality simplifies the process of generating continuous, uniformly-sampled time-series data.
August 2025Preview support for directed joins. You can enforce join ordering when you run a query with the JOIN clause by adding the DIRECTED keyword.You can more easily migrate workloads into Snowflake that have join order directives and possibly improve performance by scanning joined tables in a specific order.
July 2025You can specify the ORDER BY ALL clause to sort by all columns specified in the SELECT list.You can sort results by all columns in the SELECT list without having to specify each column by name.
June 2025You can use the UNION BY NAME operator to combine rows by name instead of by position.The UNION BY NAME operator simplifies combining subsets of columns that have different positions in the tables.
May 2025You can use the pipe operator (->>) to chain SQL statements together. In the chain of SQL statements, the results of one statement can serve as the input to another statement.The pipe operator can simplify the execution of dependent SQL statements and improve the readability and flexibility of complex SQL operations.
March 2025You can use the spread operator (**) to expand an array into a list of individual values.The spread operator can simplify function calls and queries that accept a variable number of values. For more information, see the Snowflake Introduces SQL Spread Operator (**) blog post.
February 2025The SEARCH function supports conjunctive (AND) semantics.When you specify 'AND' for the SEARCH_MODE argument, there is a match if the tokens extracted from at least one of the columns or fields being searched match all of the tokens extracted from the search string.
January 2025Support for row-based and range-based window frames in the ARRAY_AGG function.Users can aggregate subsets of data by collecting the values from moving window frames into an array.