private void button5_Click(object sender, EventArgs e)
{
string s = "select employee.empno as 员工号,employee.empname as 姓名,";
s += "employee.empage as 年龄,sum(works.salary) as 总工资 ";
s += "from employee,works where employee.empno=works.empno ";
s += "and employee.empage>=40 ";
s += "group by employee.empno,employee.empname,employee.empage ";
s += "order by sum(works.salary) desc";
loadLV(listView2,s);
}
统计限定条件下某数据的总和
最新推荐文章于 2020-12-21 11:45:16 发布