'Looking for a query that only returns results with matching IDs
Solution 1:[1]
For example if you only need to select group_id for which value A, B and C all are available you can use group by with aggregation like below:
SELECT group_id FROM envelope_characteristic
WHERE value IN ('A','B','C');
GROUP BY GROUP_ID
HAVING COUNT(DISTINCT VALUE)=3
Solution 2:[2]
As far as I can tell your existing structure should be OK. You could write a query that goes like this:
SELECT group_id FROM envelope_characteristic WHERE value IN (...);
It'll return all the group_ids that contain the values you're searching for.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kazi Mohammad Ali Nur |
| Solution 2 | JeanRemyDuboc |

