I like to substring the second row 'text2'from the mysql table. Thanks!
$sql = "select e.id, e.text1, e.text2, e.text3, count(r.id) reportCount " .
"from employee e left join employee r on r.managerId = e.id " .
"group by e.id order by e.text1, e.text2";
try { ...