如何在grouptitle=notitle的组中查找count成员。我的数据库是mysql。
groups table -> id | group_number | notification_id | group_title | salavat_count | status
32 1kk NULL notitle 0 idle
33 2k NULL notitle 0 idle
groups_members table -> id | groups_id | members_id
1 32 222
我要给你看:
groups.id | memberCount
32 1
33 0
2条答案
按热度按时间dohp0rv51#
选择count(*)from groups\u member join groups on groups.group\u number=groups\u member.id where groups.group\u title='notitle'
sqxo8psd2#
我找到了。