select a,b,c,d,sum(cast(c as float)) as total from 表 where b='?' group by a,b,c,d
select a+b+c+d from b=b
如果只顯示一條記錄,用下面: select max(a),max(b),max(c),max(d),sum(cast(c as float)) as total from 表 where b='?' 或者select max(cast(a as varchar(20))+','+cast(b as varchar(20))+cast(c as varchar(20))+cast(d as varchar(20))),sum(cast(c as float)) as total from 表 where b='?'
select a,b,c,d,sum(cast(c as float)) from 表 where b=条件
select max(a),max(b),max(c),max(d),sum(cast(c as float)) as total from 表 where b='?' 或者select max(cast(a as varchar(20))+','+cast(b as varchar(20))+cast(c as varchar(20))+cast(d as varchar(20))),sum(cast(c as float)) as total from 表 where b='?'