Some parts of the output code are omitted for clarity reasons.
Description
This error is added when an aggregate function as
DENSE_RANK()
RANK()
PERCENT_RANK()
CUME_DIST()
is not supported in Snowflake.
Example Code
Input Code:
IN -> Oracle_01.sql
SELECTDENSE_RANK(12000) WITHINGROUP (ORDER BY salary DESCNULLSFIRST) FROM employees;SELECTRANK(12000) WITHINGROUP (ORDER BY salary DESCNULLSFIRST) FROM employees;SELECTPERCENT_RANK(12000) WITHINGROUP (ORDER BY salary DESCNULLSFIRST) FROM employees;SELECTCUME_DIST(12000) WITHINGROUP (ORDER BY salary DESCNULLSFIRST) FROM employees;
Output Code:
OUT -> Oracle_01.sql
SELECT!!!RESOLVE EWI!!! /*** SSC-EWI-OR0023 - DENSE_RANK AGGREGATE FUNCTION SYNTAX IS NOT SUPPORTED BY SNOWFLAKE. ***/!!!DENSE_RANK(12000) WITHINGROUP (ORDER BY salary DESCNULLSFIRST) FROM employees;SELECT !!!RESOLVE EWI!!! /*** SSC-EWI-OR0023 - RANK AGGREGATE FUNCTION SYNTAX IS NOT SUPPORTED BY SNOWFLAKE. ***/!!! RANK(12000) WITHIN GROUP (ORDER BY salary DESC NULLS FIRST) FROM
employees;SELECT !!!RESOLVE EWI!!! /*** SSC-EWI-OR0023 - PERCENT_RANK AGGREGATE FUNCTION SYNTAX IS NOT SUPPORTED BY SNOWFLAKE. ***/!!! PERCENT_RANK(12000) WITHIN GROUP (ORDER BY salary DESC NULLS FIRST) FROM
employees;SELECT !!!RESOLVE EWI!!! /*** SSC-EWI-OR0023 - CUME_DIST AGGREGATE FUNCTION SYNTAX IS NOT SUPPORTED BY SNOWFLAKE. ***/!!! CUME_DIST(12000) WITHIN GROUP (ORDER BY salary DESC NULLS FIRST) FROM
employees;