This should work:
select * from table where group_id in
(
select group_id from table where type = 1
)
You can also try join
instead of in
select a.* from table a
join
(
select group_id from table where type = 1
) b on b.group_id = a.group_id
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.