私はこれで完全に迷っています。サブクエリが複数の行を返すというエラーを受け取り続けます。何か案は?
SELECT
m.MealID, m.Title, m.SeoUrl, m.Likes,
(SELECT Photo FROM Recipe WHERE RecipeID=
(SELECT r1.RecipeID FROM Ref_Meal r1
LEFT OUTER JOIN Ref_Meal r2 ON r1.MealID=r2.MealID AND r1.Sort > r2.Sort
WHERE r1.MealID=m.MealID AND r2.MealID IS NULL)) as Photo,
(SELECT MAX(rs.Skill) FROM Recipe rs JOIN Ref_Meal rms ON rms.RecipeID=rs.RecipeID WHERE rms.MealID=m.MealID) as Skill
FROM Meal m
JOIN MemberMealBookmark b ON b.MealID=m.MealID
WHERE b.MemberID=4 ORDER BY Title