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

.net - Bulk insert via Dapper is slower than inserting rows one-by-one -

shared memory - gstreamer shmsrc and shmsink with h264 data -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -