123
SELECT users.name, MAX(fotos.id) AS MaxFotoID, fotos.name AS aktuellstes_foto FROM users LEFT JOIN fotos ON fotos.userid = users.name