I have this query in Bigquery: SELECT column1, column2, count(*) FROM table GROUP BY column1, column2 HAVING COUNT(*) > 1 When I run it, I get no data as a result, so no duplicates in the table. However, if I run this SELECT count(*) FROM ( SELECT column1, column2, count(*) FROM table GROUP BY column1, column2 HAVING COUNT(*) > 1 ) The result is 470548, meaning every single row in the table. Why? I would expect to get 0 or null, since the subquery has no result at all. submitted by /u/JLTDE [link] [comments]