日期:2014-05-18 浏览次数:20565 次
CREATE TABLE file201206 ( country VARCHAR(100), aa FLOAT ) GO INSERT INTO file201206 SELECT '市话冯芳慧', 12.429999999999998 UNION SELECT '国内长途鲁红华', 12.870000000000001 UNION SELECT '市话鲁红华', 13.969999999999992 UNION SELECT '国内长途冯芳慧', 14.850000000000001 UNION SELECT '市话付方涛', 15.339999999999996 UNION SELECT '市话黄丽娟', 15.619999999999999 UNION SELECT '国内长途王洁', 15.840000000000002 UNION SELECT '国内长途黄琼婵', 16.170000000000002 UNION SELECT '市话杨葵尚', 19.139999999999986 UNION SELECT '国内长途钟小华', 19.139999999999997 UNION SELECT '市话姚梅', 19.689999999999994 UNION SELECT '市话潘冬云', 19.799999999999994 UNION SELECT '市话甘红', 20.899999999999991 GO SELECT REPLACE(REPLACE(country,'市话',''),'国内长途','') AS country,SUM(aa) AS aa FROM file201206 GROUP BY REPLACE(REPLACE(country,'市话',''),'国内长途','') country aa 冯芳慧 27.28 付方涛 15.34 甘红 20.9 黄丽娟 15.62 黄琼婵 16.17 鲁红华 26.84 潘冬云 19.8 王洁 15.84 杨葵尚 19.14 姚梅 19.69 钟小华 19.14