Is it possible to join 3 tables on MySQL on which final output will show sample below.
Table1
Dog 2
Cat 3
Table2
Dog 1
Cow 3
Table3
Cat 1
Rat 3
Final Output
Dog 3
Cat 4
Rat 3
Cow 3
Updated Output
Thanks, but how to do if the output is like below.<br><table>
<tr>
<th>Animal</th>
<th>Table 1</th><th>Table 2</th><th>Table 3</th>
</tr>
<tr>
<td>Dog</td>
<td>2</td><td>1</td><td>0</td>
</tr> <tr>
<td>Cat</td>
<td>3</td><td>0</td><td>1</td>
</tr><tr>
<td>Cow</td>
<td>0</td><td>3</td><td>0</td>
</tr> <tr>
<td>Rat</td>
<td>0</td><td>0</td><td>3</td>
</tr></table>
I hope you can help me with this problem.
Thanks.
UNION ALLand then aggregate the result on the animal column. This isn't a join problem.