发布网友 发布时间:2022-04-22 02:38
共4个回答
热心网友 时间:2022-04-09 16:10
SELECT Table2.t_name,sum(Table1.s_total) FROM Table1,Table2 WHERE Table1.s_date LIKE '2013-02-__' GROUP BY Table2.t_name热心网友 时间:2022-04-09 17:28
SELECT Table2.t_name,sum(Table1.s_total) FROM Table1,Table2 WHERE Table1.s_date LIKE '2013-02-__' GROUP BY Table2.t_name追答SELECT Table2.t_name,count(Table1.s_total) FROM Table1,Table2 WHERE Table1.s_date LIKE '2013-02-__' GROUP BY Table2.t_name
把SUM改成COUNT试试。
热心网友 时间:2022-04-09 19:03
SELECT
热心网友 时间:2022-04-09 20:54
SELECT Table2.t_name,sum(Table1.s_total) FROM Table1,Table2 WHERE Table1.s_date LIKE '2013-02-__' GROUP BY Table2.t_name