网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
将各个系教师的平均工资定义为视图average_salary. create view average_salary as select dept_name,max(salary) from instructor; group by dept_name;
参考答案和解析
公务员工资
更多 “将各个系教师的平均工资定义为视图average_salary. create view average_salary as select dept_name,max(salary) from instructor; group by dept_name;” 相关考题
考题
设有关系模式:教师表(教师号,教师名,所在系,工资),现需建立一个统计每个系全体教师工资总额的视图,正确的语句是——。A.CREATE VIEW SalaryView(系名。工资总额)ASSELECT。所在系,COUNT(工资)FROM教师表GROUP BY所在系B.CREATE VIEW SalaryView(系名,工资总额)AS SELECT所在系,sLJM(工资)FROM教师表GROUP BY所在系C.CREATE VIEW SalaryView AS SELECT所在系,COtYNT(工资)FROM教师表 GROUP BY所在系D.CREATE VIEW SalaryView AS SELECT所在系,SLJM(工资)FROM教师表 GROUP BY所在系
考题
有教师表(教师号,姓名,所在系,工资),找出系内教师平均工资高于全体教师平均工资的系信息,正确的语句是______。A.SELECT所在系,AVG(工资)FROM教师表 WHERE AVG(工资)(SELECT AVG(工资)FEOM教师表)B.SELECT所在系,AVG(工资)FROM教师表 WHERE AVG(工资)(SELECT AVG(工资)FEOM教师表) GROUP BY所在系C.SELECT所在系,AVG(工资)FROM教师表 GROUP BY所在系 HAVING AVG(工资)(SELECT AVG(工资)FEOM教师表)D.SELECT所在系,AVG(工资)FROM教师表 GROUP BY所在系 WHERE AVG(工资)(SELECT AVG(工资)FEOM教师表)
考题
有教师表(教师号,姓名,所在系,工资),找出系内教师平均工资高于全体教师平均工资的系,正确的语句是______。A)SELECT所在系,AVG(工资)FROM教师表WHERE AVG(工资)>(SELECT AVG(工资)FROM教师表)B)SELECT所在系,AVG(工资)FROM教师表WHERE AVG(工资)>(SELECT AVG(工资)FROM教师表)GROUP BY所在系C)SELECT所在系,AVG(工资)FROM教师表GROUP BY所在系HAVING AVG(工资)>(SELECT AVG(工资)FROM教师表)D)SELECT所在系,AVG(工资)FROM教师表GROUP BY所在系WHERE AVG(工资)>(SELECT AVG(工资)FROM教师表)A.B.C.D.
考题
( 29 ) 设有关系模式:教师表(教师号,教师名,所在系,工资),现需建立一个统计每个系全体教师工资总额的视图,正确的语句是A ) CREATE VIEW SalaryView (系名,工资总额) ASSELECT 所在系, COUNT( 工资 ) FROM 教师表 GROUP BY 所在系B ) CREATE VIEW SalaryView (系名,工资总额) ASSELECT 所在系, SUM( 工资 ) FROM 教师表 GROUP BY 所在系C ) CREATE VIEW SalaryView ASSELECT 所在系, COUNT( 工资 ) FROM 教师表 GROUP BY 所在系D ) CREATE VIEW SalaryView ASSELECT 所在系, SUM( 工资 ) FROM 教师表 GROUP BY 所在系
考题
有教师表 ( 教师号 , 姓名 , 所在系 , 工资 ) , 找出系内教师平均工资高于全体教师平均工资的系信息 ,正确语句是A )SELECT 所在系 , AVG( 工资 ) FORM. 教师表WHERE AVG( 工资 )(SELECT AVG( 工资 ) FROM 教师表 )B )SELECT 所在系 , AVG( 工资 )FROM 教师表WHERE AVG( 工资 )(SELECT AVG( 工资 ) FROM 教师表 ) GROUP BY 所在系C )SELECT 所在系 , AVG( 工资 ) FROM 教师表GROUP BY 所在系 HAVING AVG( 工资 )(SELECT AVG( 工资 ) FROM 教师表 )D )SELECT 所在系 , AVG( 工资 ) FROM 教师表 GROUPBY 所在系WHERE AVG( 工资 )(SELECT AVG( 工资 ) FROM 教师表 )
考题
建立一个视图salary,该视图包括了系号和(该系的)平均工资两个字段,正确的 SQL语句是A.CREATE VIEW salary AS系号,AVG(工资)AS平均工资FROM教师; GROUP BY系号B.CREATE VIEW salary AS SELECT系号,AVG(工资)AS平均工资FROM教师; GROUP BY系名C.CREATE VIEW salary SELECT系号,AVG(工资)AS平均工资FROM教师; GROUP BY系号D.CREATE VIEW salary AS SELECT系号,AVG(工资)AS平均工资FROM教师; GROUP BY系号
考题
Examine the structure of the EMP_DEPT_VU view:Column Name Type RemarksEMPLOYEE_ID NUMBER From the EMPLOYEES tableEMP_NAME VARCHAR2(30) From the EMPLOYEES table JOB_ID VARCHAR2(20) From the EMPLOYEES tableSALARY NUMBER From the EMPLOYEES tableDEPARTMENT_ID NUMBER From the DEPARTMENTS table DEPT_NAME VARCHAR2(30) From the DEPARTMENTS table Which SQL statement produces an error?()A. SELECT * FROM emp_dept_vu;B. SELECT department_id, SUM(salary) FROM emp_dept_vu GROUP BY department _ id;C. SELECT department_id, job_id, AVG(salary) FROM emp_dept_vu GROUP BY department _ id, job_id;D. SELECT job_id, SUM(salary) FROM emp_dept_vu WHERE department_id IN (10,20) GROUP BY job_id HAVING SUM (salary) 20000E. None of the statements produce an error; all are valid.
考题
根据SQL标准,创建一个视图abc,通过该视图只能对表student中系dept为‘IS’的记录进行更新操作。下面哪条语句适用?()A create view abc as select * from student where dept=’IS’B create view abc as select * from student where dept=’IS’ with check optionC create view abc as student where dept=’IS’D create view abc as select dept=’IS’ from student
考题
Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2(25)LAST_NAME VARCHAR2(25)DEPARTMENT_ID NUMBERSALARY NUMBERWhat is the correct syntax for an inline view? ()A. SELECT a.last_name, a.salary, a.department_id, b.maxsal FROM employees a, (SELECT department_id, max(salary)maxsal FROM employees GROUP BY department_id) b WHERE a.department_id = b.department_id AND a.salary b.maxsal;B. SELECT a.last name, a.salary, a.department_id FROM employees a WHERE a.department_id IN (SELECT department_id FROM employees b GROUP BY department_id having salary = (SELECT max(salary) from employees))C. SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE a.salary = (SELECT max(salary) FROM employees b WHERE a.department _ id = b.department _ id);D. SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE (a.department_id, a.salary) IN (SELECT department_id, a.salary) IN (SELECT department_id max(salary) FROM employees b GROUP BY department_id ORDER BY department _ id);
考题
Examine the data in the EMPLOYEES table:Which three subqueries work? ()
A. SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);B. SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);C. SELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);D. SELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);E. SELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);F. SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));
考题
Examine the data in the EMPLOYEES table:LAST_NAME DEPARTMENT_ID SALARYGetz 10 3000Davis 20 1500Bill 20 2200Davis 30 5000...Which three subqueries work? ()
A. SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);B. SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);C. SELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);D. SELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);E. SELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);F. SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));
考题
Click the Exhibit button and examine the data in the EMPLOYEES table.Which three subqueries work? ()
A.SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department_id);B.SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);C.SELECT distinct department_id FROM employees WHERE salary ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);D.SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);E.SELECT last_name FROM employees WHERE salary ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);F.SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));
考题
“教师表”中有“职工号”、“姓名”、“工龄”和“系号”等字段,“学院表”中有“系名”和“系号”等字段,求教师总数最多的系的教师人数,正确的命令序列是A.SELECT教师表.系号,COUNT(*)AS人数FROM教师表,学院表;GROUP BY教师表.系号INTO DBF TEMPSELECT MAX(人数)FROM TEMPB.SELECT教师表.系号,COUNT(*)FROM教师表,学院表;WHERE教师表.系号=学院表.系号GROUP BY教师表,系号INTO DBF TEMPSELECT MAX(人数)FROM TEMPC.SELECT教师表.系号,COUNT(*)As人数FROM教师表,学院表;WHERE教师表.系号=学院表.系号GROUP BY教师表.系号TO FILE TEMPSELECT MAX(人数)FROM TEMPD.SELECT教师表.系号,COUNT(*)AS人数FROM教师表,学院表;WHERE教师表.系号:学院表.系号GROUP BY教师表.系号INTO DBF TEMPSELECT MAX(人数)FROM TEMP
考题
建立一个视图salary,该视图包括了系号和(该系的)平钧工资两个字段,正确的是SQL语句是A)CREATE VIEW salaryAS系号,AVG(工资)AS平均工资FROM教师;GROUP BY系号B) CREATE VIEW salary AS SELECT系号,AVG(工资)AS平均工资FROM教师;GROUP BY系名C) CREATE VIEW salary SELECT系号,AVG(工资)AS平均工资FROM教师;GROUP BY系号D)CREATE VIEW salary AS SELECT系号,AVG(工资)As平均工资FROM教师;GROUP BY系号
考题
“教师表”中有“职工号”“姓名”“工龄”和“系号”等字段,“学院表”中有“系名”和“系号”等字段,求教师总数最多的系的教师人数,正确的命令序列是( )。A.SELECT教师表,系号,COUNT(*)AS人数FROM教师表,学院表GROUP BY教师表,系号INTO DBF TEMP SELECT MAX(人数)FROM TEMPB.SELECT教师表,系号,COUNT(*)FROM教师表,学院表WHERE教师表,系号一学院表,系号GROUP BY教师表,系号INTO DBF TEMP SELECT MAX(人数)FROM TEMPC.SELECT教师表,系号,CoUNT(*)AS人数FROM教师表,学院表WHERE教师表,系号一学院表,系号GROUP BY教师表,系号TO FILE TEMP SELECT MAX(人数)FROM TEMPD.SELECT教师表,系号,COUNT(*)AS人数FRoM教师表,学院表WHERE教师表,系号一学院表,系号GROUP BY教师表,系导INTO DBF TEMP SELECT MAX(人数)FROM TEMP
考题
建立一个视图salary,该视图包括了系号和(该系的)平均工资两个字段,正确的SQL语句是( )。A.CREATE vIEw salary AS系号.AVG(工资)AS平均工资FRM教师GRUP BY系号B.CREATE VIEW salary AS SELECT 系号,AVG(工 资)AS平均工资FROM教师GROUP BY系名C.CREATE VIEw salary SELECT 系号,AVG(工资)AS平均工资FRM教师 GRUP BY系号D.CREATE VIEW salary AS SELECT系号,AVG(工 资)AS平均工资FRM教师 GROUP BY系号
考题
建立一个视图salary,该视图包括了系号和(该系的)平均工资两个字段,正确的SQL语句是( )。A)CREATE VIEW salary AS系号,AVG(工资)AS平均工资FROM教师;GROUPBY系号B)CREATEVIEW salaryAS SELECT系号,AVG(工资)AS平均工资FROM教师;GROUPBY系名C)CREATE VIEW Salary SELECT系号,AVG(工资)AS平均工资FROM教师;GROUP BY系号D)CREATE VIEW salaryAS SELECT系号,AVG(工资)AS平均工资FROM教师;GROUPBY系号
考题
设有关系模式商品(商品号,商品名称,单价,数量,类别),建立统计每类商品总数量的视图的正确语句是()A、CREATE VIEW v1AS SELECT类别,SUM(数量)FROM商品GROUP BY类别B、CREATE VIEW v1AS SELECT类别,COUNT(数量)FROM商品GROUP BY类别C、CREATE VIEW v1(类别,总数量)AS SELECT类别,SUM(数量)FROM商品GROUP BY类别D、CREATE VIEW v1(类别,总数量)AS SELECT类别,COUNT(数量)FROM商品GROU PBY类别
考题
有关系模式:学生表(学号,姓名,所在系),建立统计每个系的学生人数的视图的正确语句是()A、CREATE VIEW v1AS SELECT所在系,COUNT(*)FROM学生表GROUP BY所在系B、CREATEVIEW v1AS SELECT所在系,SUM(*)FROM学生表GROUP BY所在系C、CREATE VIEW v1(系名,人数)AS SELECT所在系,SUM(*)FROM学生表GROUP BY所在系D、CREATE VIEW v1(系名,人数)AS ELECT所在系,COUNT(*)FROM学生表GROUP BY所在系
考题
Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHAR2(30) SALARY NUMBER(8,2) Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only of the minimum salary is less then 5000 and the maximum salary is more than 15000?()A、SELECT dept_id, MIN(salary(, MAX(salary) FROM employees WHERE MIN(salary) 5000 AND MAX (salary) 15000;B、SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) 5000 AND MAX(salary) 15000 GROUP BY dept_id;C、SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) 5000 AND MAX (salary) 15000;D、SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN (salary) 5000 AND MAX(salary)E、SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN (salary) 5000 AND MAX (salary) 15000;
考题
Examine the data in the EMPLOYEES table: LAST_NAME DEPARTMENT_ID SALARY Getz 10 3000 Davis 20 1500 Bill 20 2200 Davis 30 5000 ... Which three subqueries work? ()A、SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);B、SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);C、SELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);D、SELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);E、SELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);F、SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));
考题
Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHARD2(30) SALARY NUMBER(8,2) Which statement shows the maximum salary paid in each job category of each department? ()A、SELECT dept_id, job_cat, MAX(salary) FROM employees WHERE salary MAX (salary);B、SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id,job_cat;C、SELECT dept_id, job_cat, MAX(salary) FROM employees;D、SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id;E、SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept _ id job _ cat salary;
考题
单选题根据“职工”表建立一个“部门”视图,该视图包括了部门编号和(该部门的)平均工资两个字段,正确的SQL语句是( )。A
CREATE VIEW部门AS部门编号,AVG(工资)AS平均工资FROM职工GROUP BY部门编号B
CREATE VIEW部门AS SELECT部门编号,AVG(工资)AS平均工资FROM职工GROUP BY部门名称C
CREATE VIEW部门SELECT部门编号,AVG(工资)AS平均工资FROM职工GROUP BY部门编号D
CREATE VIEW部门AS SELECT部门编号,AVG(工资)AS平均工资FROM职工GROUP BY部门编号
考题
单选题Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER SALARY NUMBER What is the correct syntax for an inline view?()A
SELECT a.last_name, a.salary, a.department_id,B
maxsal FROM employees a, (SELECT department_id, max(salary)maxsal FROM employees GROUP BY department_id) b WHERE a.department_id = b.department_id AND a.salary b.maxsal;C
SELECT a.last name, a.salary, a.department_id FROM employees a WHERE a.department_id IN (SELECT department_id FROM employees b GROUP BY department_id having salary = (SELECT max(salary) from employees))D
SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE a.salary = (SELECT max(salary) FROM employees b WHERE a.department _ id = b.department _ id);E
SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE (a.department_id, a.salary) IN (SELECT department_id, a.salary) IN (SELECT department_id max(salary) FROM employees b GROUP BY department_id ORDER BY department _ id);
考题
单选题Using the report wizard you create a tabular report to display all the columns in the EMP table. The records are ordered by the deptname and job columns. You need to create a hierarchical report that breaks on the deptname and job values. Using the data model how would you create this break structure?()A
Specify the break order on the gemp group Property palette. B
Specify a break order on the dept_name and job columns property palettes. C
Click and drag the dept_name and jobs column out and above of the gemp group to create a new parent group. D
Change the position of the dept_name and the job columns within the gemp group.
考题
多选题Examine the data in the EMPLOYEES table: Which three subqueries work? ()ASELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);BSELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);CSELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);DSELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);ESELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);FSELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));
考题
多选题Click the Exhibit button and examine the data in the EMPLOYEES table. Which three subqueries work?()ASELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department_id);BSELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);CSELECT distinct department_id FROM employees WHERE salary ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);DSELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);ESELECT last_name FROM employees WHERE salary ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);FSELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));
考题
多选题Examine the data in the EMPLOYEES table: LAST_NAME DEPARTMENT_ID SALARY Getz 10 3000 Davis 20 1500 Bill 20 2200 Davis 30 5000 ... Which three subqueries work? ()ASELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);BSELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);CSELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);DSELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);ESELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);FSELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));
热门标签
最新试卷