plsql - oracle database, Omitting records from a table which are subset of records in same table based on two columns -


i have customers clustered groups cluster_id , amount of data huge (so performance matter here). simplest form of have following table:

cust_id | cluster_id
---------- | -----------
1 | 1
2 | 1
3 | 1
2 | 2
1 | 2
2 | 3
4 | 3
1 | 4

i want clusters greatest number of customers such no costumer removed. in other words, want delete records of cluster subset of cluster. in above example, output table should this:

cust_id cluster_id
-------- | ----------
1 | 1
2 | 1
3 | 1
2 | 3
4 | 3


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -