统计同时具有两个以上工作员工的总工资

2019-04-01  本文已影响0人  czm123
        private void button5_Click(object sender, EventArgs e)
        {
            string s = "select workers.wnum as 员工号,workers.wname as 员工名,";
            s += "sum(relate.wage) as 总工资 from workers,relate ";
            s += "where workers.wnum=relate.wnum ";
            s += "and workers.wnum in (select wnum from relate group by wnum having count(cnum)>=2)";
            s += "group by workers.wnum,workers.wname";
            loadLV(listView2,s);
        }
上一篇下一篇

猜你喜欢

热点阅读