Answer the question
In order to leave comments, you need to log in
How to extract data in groups with group row search?
Hello!
The database has columns: id, group_id, data
It is necessary to extract data from the table in the following way:
1) the data must be grouped by group_id
2) the condition where data = 'data132' is set
As a result, you need to get all groups for which at least one line, condition 2 is met.
How can this be implemented?
Thank you.
Answer the question
In order to leave comments, you need to log in
Select distinct group_id
from MyTable
where data = 'data132'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question