Database query failed: Disk full (/tmp/#sql_3df_0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")

Last SQL query: SELECT p.id, p.id AS person_id, p.fname, p.lname, p.image, p.gender, p.type, p.position, p.other, tp.team_id, (COUNT(game_id)+n.nastup) AS number FROM people AS p INNER JOIN team_players AS tp ON p.id = tp.player_id left join game_players as gp on gp.team_id=tp.team_id and gp.person_id=p.id left join games as g on g.id=gp.game_id left join nastupi as n on n.team_id=tp.team_id and n.player_id=p.id WHERE tp.team_id = 164 and (p.type='PLAYER' or p.type='COACH' or p.type='OFFICIALS' or p.type='GHOST') group by p.id ORDER BY CASE WHEN p.type = 'PLAYER' THEN 0 WHEN p.type='COACH' THEN 1 WHEN p.type='OFFICIALS' THEN 2 ELSE 3 END, p.lname