SELECT users.name, (SELECT id FROM photos WHERE user_id = a.user_id ORDER BY datum DESC LIMIT 1) AS letztes_foto FROM users, photos LIMIT 10