'SQL for the multiple values based on a common raw value

I have to list objects (batch) where there are multiple (samples, more then 1) objects attached for the same raw value, example I have a batch nnnn that contains two samples attached: 2252021-188 2322021-151

in this case I expect the query to return the batch nnnn as the condition is to return only the batches that have more then 1 sample of the same raw value (which is 2252021-)

if the batch yyyy has more then one sample attached but the raw is different such as 2252021-188 2322023-151 I dont expect it to be returned.

any idea how to get there?

Many thanks for help

Anna

raw


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source