有没有一种方法可以在SQL中同时选择一列和其他列的总和?
例子:
SELECT sum(a) as car,b,c FROM toys
尝试添加GROUP BY
SELECT sum(a) as car,b,c FROM toys GROUP BY b, c