Count Two Column Values Based on One Same Column in Two tables in mysql
Situation is like this:
Table One (sms)
id | t_id | sms_text
1 | 200 | some text here ...
2 | 201 | some text here ...
3 | 202 | some text here ...
4 | 201 | some text here ...
5 | 202 | some text here ...
6 | 202 | some text here ...
Table Two (msg)
id | t_id | msg_text
1 | 201 | some text here ...
2 | 202 | some text here ...
3 | 200 | some text here ...
4 | 200 | some text here ...
5 | 202 | some text here ...
6 | 200 | some text here ...
Now I Want Result Something Similar
Count Result (sms + msg)
t_id | count result
200 | 4
201 | 3
202 | 5
Is is possible?? If yes, how?
No comments:
Post a Comment