SQL translator › Snowflake → T-SQL

Snowflake to SQL Server translator

Snowflake QUALIFY filters a window in one clause. SQL Server needs a derived table.

Usual swaps

SnowflakeSQL Server
QUALIFYsubquery + WHERE on the window column
LIMITTOP / OFFSET FETCH
ILIKELIKE (CI)
IFF(a,b,c)IIF(a, b, c)
NVL / IFNULLISNULL
LISTAGGSTRING_AGG
TO_VARCHARCONVERT(varchar, …)
VARIANT / PARSE_JSONOPENJSON … WITH
::typeCAST

QUALIFY rn = 1 is the “latest per customer” pattern. See /interview/latest-per-customer.

Then write it on a ticket

Monday is free. A colleague asks, you type, we mark it.

Clock in free