I am facing a issue. Basically, i want to delete all duplicate rows, i did it successfully in a few tables. But there is a table that contains FLOAT column which is REVENUE. It show this error:
Error: Partitioning by expressions of type FLOAT64 is not allowed at [5:70] Here are my codes:
CREATE OR REPLACE TABLE `pops-204909.monthly_reports.top_20_countries_revenue` AS
SELECT * EXCEPT(rn)
FROM
(
SELECT *, ROW_NUMBER() OVER(PARTITION BY CMS_ID, DATE,COUNTRY_NAME,REVENUE ORDER BY DATE ) rn
FROM `pops-204909.monthly_reports.top_20_countries_revenue`
)
WHERE rn = 1