How to write nested query

Hi @hharrington ,

It seems that I found a solution which may work for your case.

Here is an example of such query:

In this query I searched sample_id by condition which includes presense of 2 entries. Pay attention to the having clause - it filters out all sample_id which have less than 2 entries.

In your case, number in having clause should always match number of elements which should be present in your sample.

If you have any further questions post them here and I will try to help.

Regards, Andriy