I have two table login_info_1,login_info_2 which has a column user_id in each table
select user_id,count(user_id) as cnt from login_info_1 group by user_id;
which gives me result like this
user_id cnt
101 4
102 5
103 1
107 7
same for the second table
select user_id,count(user_id) as cnt2 from login_info_2 group by user_id;
user_id cnt
101 3
102 2
103 2
107 1
I want to combine these two tables and the results should look like this
user_id cnt
101 7
102 7
103 3
107 2
Database: MYSQL