I'm simply trying to identify duplicate values within BigQuery.
My code looks like:
SELECT
address,
title_1,
COUNT(*)
FROM
`target.querytable`
GROUP BY
1,2
HAVING
COUNT (*) > 1
I'm trying to identify duplicate records in the title_1 field and select their corresponding url from the address column along with the sum of the duplication. Ideally the output would look like:

Below is for BigQuery Standard SQL
#standardSQL
SELECT * FROM (
SELECT *, COUNT(1) OVER(PARTITION BY title_1) dup_count
FROM `target.querytable`
)
WHERE dup_count > 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With