--DELETE DUPLICATE VALUE IF HAVE TO
WITH cte AS
(
SELECT *, ROW_NUMBER() OVER (PARTITION BY ride_id ORDER BY started_at) AS row_num
FROM `case-study-1-bike-share.bike_share.202102`
)
DELETE FROM cte
WHERE row_num > 1;
I want to delete duplicate value but received the following error instead. How do i fix this?