Show me all branch names with the number of members in each branch registered after 2015
select t2.name, count ( * ) from membership_register_branch as t1 join branch as t2 on t1.branch_id = t2.branch_id where t1.register_year > 2015 group by t2.branch_id
When were those branches opened?
select t2.name, t2.open_year from membership_register_branch as t1 join branch as t2 on t1.branch_id = t2.branch_id where t1.register_year > 2015 group by t2.branch_id
Thanks!
select count ( * ) from ( select t2.name from membership_register_branch as t1 join branch as t2 on t1.branch_id = t2.branch_id where t1.register_year > 2015 group by t2.branch_id )