Find non-unique values within partitions in Redshift
I have a 2B+ row external table which I am reading with Redshift Spectrum. There are two relevant columns – key_col (BIGINT) and partition_col (VARCHAR). partition_col is a partition column, and there are ~50 partitions.