Try this
Run this on my data lake: SELECT order_id, COUNT(*) AS copies FROM samples.shop_orders GROUP BY order_id HAVING COUNT(*) > 1
In plain words
What is it?
Two rows with the same order number usually means something was loaded twice.
How does it work?
It groups by the column that should be unique and keeps only groups with more than one row.
Good to know
No rows back is the good answer.