Back to Code Snippets
Remove duplicatesSQL
Execute this SQL
/* removes duplicate rows at the order_id level */ SELECT * FROM orders QUALIFY row_number() over (partition by order_id order by created_at) = 1
Copy code
Octavian Zarzu
Copy code
Expand
Share link