MySQL Subquery Returns more than one row

Sub Query returning mutliple values causes this problem.

To handle it properly use the GROUP BY feature for this.