Posted in 面试题 onNovember 19, 2013
已知原表(t_salary)
year salary
2000 1000
2001 2000
2002 3000
2003 4000
先要实现显示结果(salary为以前的工资和)
year salary
2000 1000
2001 3000
答案:
select year, (select sum(salary) from t_salary b where b.year group by year
year salary
2000 1000
2001 2000
2002 3000
2003 4000
先要实现显示结果(salary为以前的工资和)
year salary
2000 1000
2001 3000
答案:
select year, (select sum(salary) from t_salary b where b.year group by year
一道写SQL的面试题和答案
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Tags in this post...
Reply on: @reply_date@
@reply_contents@