You can get the staff id who it is assigned to by adding staff_id to the query. same with team_id. or dept_id, etc.
SELECT number,dept_id,staff_id,team_id FROM ost_ticket WHERE isoverdue = '1' AND status_id = '1';
You can get the staffs email from ost_staff.
So if the staff_id of the person that ticket is assigned to is say 232.
SELECT firstname,lastname,email FROM ost_staff where staff_id = '232';
I do not know where or how to get a team or department email this way, but if you look around you can probably find it.