题目链接:点击打开链接
题目大意:略。
解题思路:略。
AC 代码
SELECT SUM(b.apple_count + IFNULL(c.apple_count, 0)) apple_count, SUM(b.orange_count + IFNULL(c.orange_count, 0)) orange_count FROM Boxes b LEFT JOIN Chests c USING(chest_id)
题目链接:点击打开链接
题目大意:略。
解题思路:略。
AC 代码
SELECT SUM(b.apple_count + IFNULL(c.apple_count, 0)) apple_count, SUM(b.orange_count + IFNULL(c.orange_count, 0)) orange_count FROM Boxes b LEFT JOIN Chests c USING(chest_id)