How to retrieve data groups to search the rows of the groups?
The database has columns: id, group_id, data
Need from the table to retrieve the data in the following way:
1) data should be grouped by group_id
2) established the condition where data = 'data132'
In the result, you need to get all groups to which at least one row of the condition 2.
How it can be implemented?
asked July 4th 19 at 23:10
Select distinct group_id
where data = 'data132'
Find more questions by tags MySQLSQL