try the following query this will gives you numbers of absents along with student name from attendance and student tables of your database
select s.id,s.name,a.absents form students s join attendance a where s.id=a.id
provide your table schema and you requirements for accurate query