如果每月除了固定工资还有600元交通补贴,查找在各个公司的每个月总收入
A: SELECT salary+600 FROM job;
B: SELECT name, salary+600 FROM job;
C: SELECT name+600, salary FROM job;
D: SELECT name, salary add 600 FROM job;
A: SELECT salary+600 FROM job;
B: SELECT name, salary+600 FROM job;
C: SELECT name+600, salary FROM job;
D: SELECT name, salary add 600 FROM job;
举一反三
- 如果除了月工资,年终还发放全年工资的40%作为年终奖,计算每个公司的年收入( ) A: SELECT name, salary*(12+ salary*12*0.4) FROM job; B: SELECT name, salary*12+ 0.4 FROM job; C: SELECT name, salary*12+ salary*0.4 FROM job; D: SELECT name, salary*12+ salary*12*0.4 FROM job;
- 查询各类别的公司中比该类别最小工资高300元的公司、工资、类别 A: SELECT name, salary, type FROM job AS s1 WHERE salary > (SELECT min(salary) FROM job AS s2 WHERE s1.type = s2.type GROUP BY type) ; B: SELECT name, salary, type FROM job AS s1 WHERE salary > (SELECT min(salary) FROM job AS s2 WHERE s1.type = s2.type ) + 300; C: SELECT name, salary, type FROM job WHERE salary > 300; D: SELECT name, salary, type FROM job AS s1 WHERE salary > (SELECT min(salary) FROM job AS s2 WHERE s1.type = s2.type GROUP BY type) + 300;
- 输出公司的名称及id,以id的升序排列 A: SELECT name, id FROM job ORDER BY id ASC; B: SELECT name, id FROM job ORDER BY id DESC; C: SELECT name, id FROM job ORDER BY name DECS; D: SELECT name, id FROM job ORDER BY name ASC;
- 表employees中有字段title表示职务,字段salary表示工资,求各个职务平均工资的T-SQL语句是( )。 A: SELECT AVG(SALARY) FROM EMPLOYEES WHERE TITLE B: SELECT AVG(SALARY) FROM EMPLOYEES GROUP BY TITLE C: SELECT AVG(TITLE) FROM EMPLOYEES GROUP BY SALARY D: SELECT SALARY FROM EMPLOYEES GROUP BY TITLE
- 以下语句错误的是() A: LECT rank, AVG(salary) FROM people HAVING AVG(salary) > 1000 GROUP BY rank; B: SELECT rank, AVG(salary) FROM people GROUP BY rank HAVING AVG(salary) > 1000 C: SELECT rank, AVG(salary) FROM people HAVING AVG(salary) > 1000 GROUP BY rank; D: SELECT AVG(salary) FROM people GROUP BY rank HAVING AVG(salary) > 1000; E: SELECT rank, AVG(salary) FROM people GROUP BY rank WHERE AVG(salary) > 1000;