This action might not be possible to undo. Are you sure you want to continue?
a. b. c. d. e.
Which statement about joining tables with a non-equijoin is true?
A WHERE clause must specify a column in one table that directly corresponds to a column in the second table The tables being joined must NOT have any columns with the same name The number of join conditions required is always one less than the number of tables being joined No more than three tables can be joined using a non-equijoin The columns being joined must have compatible data types
Consider the following SELECT statement: SELECT ename, emp_number, salary FROM employee WHERE dept_number = (SELECT dept_number FROM department WHERE location IN('CHICAGO', 'NEW YORK')) Why does this statement return an error?
a. b. c. d. A multiple-row subquery returns one row A single-row subquery returns more than one row A multiple-column subquery returns one column A multiple-row query uses a single-row subquery
Consider the following SELECT statement: SELECT ename, empno, sal FROM emp WHERE deptno = (SELECT deptno FROM dept WHERE UPPER(loc) = UPPER('&loc')) When executing this statement, what could be the result?
a. b. c. d. The statement executes successfully if the LOC column in the DEPT table has unique values The statement fails if the values returned from a multiple-row subquery are compared with an equality operator in the main query The statement fails because an ampersand (&) character cannot be used in the subquery of a SELECT statement The statement executes successfully, but does not return the expected results because of the use of the UPPER function twice in the subquery
Examine the following statement: 4. SELECT empno_seq.CURRVAL FROM SYS.dual; Which value is displayed?
a. b. c. d. Current value of the EMPNO_SEQ sequence Current value of the EMPNO_SEQ cursor Values of the EMPNO_SEQ column Current value of the EMPNO_SEQ index
If a database is queried with the following command: SELECT object_name FROM all_objects WHERE object_type = 'TABLE';
c. b. AVG(sale_price) FROM ITEM. statement 2 will display a result for each item Consider the following SELECT statement: SELECT dept_no "Departments". d. 8. d.2). Only the names of all the tables that can be accessed Only the names of all the objects that can be accessed Only the names of the objects that are owned Only the names of the tables that are owned The ITEM table contains the following columns: ID NUMBER(7) PK SALE_PRICE NUMBER(7. statement 1 could display more than one One of the statements will generate an error Statement 1 will display three values.SELECT ROUND(MAX(sale_price).SELECT MAX(sale_price). b. How will the results differ? a. b. 2.Which values are displayed? a. a. b. d. d. ROUND(AVG(sale_price).2). e. c. 300.2) FROM ITEM GROUP BY sale_price. c. Which of the following statements regarding the use of subqueries are true? . c. ROUND(MIN(sale_price). Statement 2 will only display one row of results. c.2) Evaluate the following SQL statements: 6. statement 2 will display three values for each sale price Statement 1 will display a result for each sale price. b. MIN(sale_price). MAX(salary) "Max Salaries" FROM employee WHERE dept_no IN(200. 400) GROUP BY Departments HAVING MAX(salary) > 60000. Which statements about data types are true? The BLOB data type stores character data up to four gigabytes The TIMESTAMP data type is an extension of the VARCHAR2 data type The CHAR data type should be used for fixed-length character data The INTERVAL YEAR TO MONTH data type allows time to be stored as an interval of years and months 10. 1. Which of the following commands cause a transaction to end? DELETE ALTER INSERT UPDATE ROLLBACK 9. Group By Where Select Having 7. Due to which clause does this statement fail? a. a. d.
but can return multiple rows A subquery CANNOT be used in the GROUP BY clause of a SELECT statement Evaluate the following SQL*Plus command: 11. FROM. ORDER BY.SQL file using the default file extension It executes the EMPDETAIL. c. d.'YEAR'). a.'YEAR'. c. but NOT the WHERE clause The SELECT.DD-MON-YY. d.'DD-MON-YY'). 'YEAR') "Date " FROM DUAL. but NOT the ORDER BY clause The SELECT. name emp emp_id NOT IN (SELECT emp_id FROM emp WHERE dept_id = 30 AND job = 'SALESMAN'). b. and HAVING clauses 14. but NOT the FROM clause The SELECT and FROM clauses. GROUP BY.SQL script file It creates the EMPDETAIL. FROM. a. c. . A subquery used with the IN operator must return multiple rows A subquery can be used in a CREATE VIEW statement. b. WHERE. What is the correct use of the Trunc command on a date? TRUNC=To_Date('09-Jan-02. Select TRUNC(To_Date('09-Jan-02. SELECT TRUNC(TO_DATE('12-Feb-99'. but NOT the WHERE clause The SELECT. e. e. WHERE. b. b. In which clauses of a SELECT statement can substitution variables be used? The SELECT and FROM clauses. regardless of the number of rows it returns A subquery used in an INTO clause of a SELECT statement must return only one column. c. d.'YEAR)"DATE: from DUAL. b. It runs the EMPDETAIL. a. 12. What would happen if the inner query returned a NULL value? a. and ORDER BY clauses. d. b. WHERE. d. c. and GROUP BY clauses. No rows would be selected from the EMPLOYEE table A syntax error would be returned All the EMPLOYEE_ID and NAME values in the EMPLOYEE table would be displayed Only the rows with EMPLOYEE_ID values equal to NULL would be included in the results 13. d.a.'DD-MON-YY').DD-MON-YY.YEAR')) "DATE" from Dual. START empdetail Which task will this command accomplish? a.SQL PL/SQL routine It invokes the editor to edit the contents of the EMPDETAIL file Evaluate the following SELECT statement: SELECT FROM WHERE emp_id."Date" from Dual. c. regardless of the number of rows it returns A subquery can be used in the SET clause of an UPDATE statement. Which operators can be used in an outer join condition? AND IN OR = 15. GROUP BY. Date =TRUNC(To_DATE('09-Jan-02'.
1) FROM dual. d. 21. c. 'DAY') Emp. b.1) FROM dual. Evaluate the following statement: TRUNCATE TABLE product.1) FROM dual. 'YYYY')) Emp. d. 22. c. Which of the following SELECT statements will get the result 'ELCOME' from the string 'WELCOME'? SELECT SUBSTR ('WELCOME'. SELECT INITCAP(TRIM('WELCOME'. a.1) FROM dual. c. a. 'MONTH') Emp. c. b. c. d. ROUND(TO_CHAR(join_date. e. a. b. ROUND(join_date. How many join conditions should be there to avoid a Cartesian Join for joining three tables? 1 2 3 None of the above 18. 2. d. 'YEAR') Emp. SELECT LOWER (SUBSTR ('WELCOME'. a. e. d. SELECT LOWER (SUBSTR('WELCOME'. c. ROUND(join_date.16. Which of the following views should a user query to display the columns associated with the Constraints on a table owned by the user? USER_CONSTRAINTS USER_OBJECTS ALL_CONSTRAINTS USER_CONS_COLUMNS USER_COLUMNS 20. d. SELECT LOWER (TRIM ('W' FROM 'WELCOME')) FROM dual. a. 2. b. e. Which script displays '01-MAR-03' when the JOIN_DATE value is '01-MAR02'? SELECT FROM SELECT FROM SELECT FROM SELECT FROM ROUND(join_date. a. Which type of join should be written to perform an outer join of tables A and B that returns all rows from B? Any outer join A left outer join A cross join A right outer join An inner join 17. Which of the following users can successfully issue this statement? The owner of the INVENTORY table . a. Which Data Dictionary view holds information about the column in a view? USER_VIEWS USER_VIEW_COLUMNS USER_TAB_COLUMNS USER_ALL_COLUMNS 19. 1. b. b.
What does SQL stand for? Strong Question Language Structured Question Language Structured Query Language Start up Language . d. b. Any user with access to the PUBLIC schema Any user with the DELETE ANY TABLE system privilege Any member of the CONNECT and RESOURCE roles 23. d. c. c.b. a.
Select 'Emp name :'||ename from emp where deptno=20.1. = LIKE BETWEEN NOT IN Is 7. seller. b. b.seller_id AND m. Examine the structures of the EMPLOYEE and DEPARTMENT tables: . c. _______ operator can be used with a multiple row SubQuery. SELECT p. c.seller_id='F10032'. e. SELECT sysdate-hire_date FROM EMP. ||. 6) FROM EMP. id_number. c. Which of the following SQL statements will display the required results? SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE>5 SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE > 5 SELECT ENAME FROM EMP WHERE (SYSDATE-HIRE_DATE)/365 > 5 SELECT ENAME FROM EMP WHERE (SYSDATE-HIRE_DATE)* 365 > 5 8. a. d. c. b. 6. d. s.id_number. ename.city FROM ITEM p. and join when executed? SELECT id_number. Which component is a literal in the following select statement? 2. SELECT id_number. b. SELECT TO_NUMBER(hire_date + 7)FROM EMP. a selection. 20. SELECT ROUND(hire_date)FROM EMP.seller_id FROM ITEM ORDER BY seller_id. Which SQL SELECT statement performs a projection. b. 5 a. d. SELECT seller_id. emp name. SALLER s WHERE p. c.seller_id.seller_id = m.seller_id FROM ITEM WHERE seller_id = 'F10032'. city FROM SALLER AND seller_id = 'F10032' ORDER BY city. d. The names of the employees who have been with the company for more than five years is to be listed. a. d. Which of the following SQL statement returns a numeric value? SELECT ADD_MONTHS(MAX (hire_date). a. a.
SELECT description.20 < 4. b.'5020'. '5050'). '5020'.20 < 4 AND manufacturer_id = ('5001'. 2. The product manufacturer id must be 5001.dept_no = d. Which SELECT statement will produce the desired result? SELECT d.dept_no = d. c. d. a. SELECT dept_name FROM employee NATURAL JOIN department WHERE LOWER(title) = 'administrative assistant' GROUP BY dept_name HAVING COUNT(emp_id) > 3. SELECT dept_name FROM employee GROUP BY dept_no HAVING LOWER(title) = 'administrative assistant' AND COUNT(*) > 3. SELECT description.dept_id) WHERE LOWER(title) = 'administrative assistant' AND COUNT(*) > 3. SELECT description. SELECT dept_name FROM employee e JOIN department d ON (e. The PRODUCT table contains the following columns: PRODUCT_ID NUMBER(9) DESCRIPTION VARCHAR2(20) COST NUMBER(5. 9.'5050').dept_name FROM employee e JOIN department d ON (e.00 AND manufacturer_id ANY('5001'.00 AND manufacturer_id BETWEEN '5001' AND '5050'.20 < 4.20 FROM product WHERE cost * .EMPLOYEE -----------------EMP_ID NUMBER NOT NULL PK NAME VARCHAR(30) NOT NULL FNAME VARCHAR(25) NOT NULL DEPT_NO NUMBER TITLE VARCHAR2(25) DEPARTMENT -----------------------DEPT_ID NUMBER NOT NULL PK DEPT_NAME VARCHAR2(25) A list of departments has to be created including the department name that have more than three administrative assistants. b. '5050'). c. Which statement should be used? SELECT description. 5020. d. . The cost displayed for each product is increased by 20 percent. '5020'. a. 3.20 FROM product WHERE cost * .2) MANUFACTURER_ID VARCHAR2(10) The product costs needs to be displayed with the following results: 1. cost * 1. cost * 1.00 AND manufacturer_id IN ('5001'.dept_id) WHERE LOWER(title) = 'administrative assistant' GROUP BY dept_name HAVING COUNT(emp_id) > 3. Twenty percent of the original cost is less than $4. cost * .20 FROM product WHERE cost * . cost * 1.20 FROM product WHERE cost * . or 5050.20 < 4.
In a SELECT statement that includes a WHERE clause. d. c. a. d. dept_id FROM employee WHERE salary > (SELECT AVG(salary) FROM employee WHERE dept_no = (SELECT dept_no FROM employee WHERE last_name = (SELECT last_name FROM employee WHERE salary > 50000))). What would happen if the inner query returned a NULL value? a. salary. salary. b.Consider the following SELECT statement: SELECT emp_id. 13. Which SELECT clause is evaluated first? a. d. No rows would be selected from the EMPLOYEE table A syntax error would be returned All the EMP_ID and NAME values in the EMPLOYEE table would be displayed Only the rows with EMP_ID values equal to NULL would be included in the results 10. c. d. find the name of the employee from emp table whose fname second charcter begins with 'e' select * from emp where fname like'_e%' select * from emp where fname like'e%' select * from emp where fname like'_e' select * from emp where fname like'ae%' . a. b. SELECT dept_no SELECT last_name SELECT name. where is the GROUP BY clause placed statement? Immediately after the SELECT clause Before the WHERE clause After the ORDER BY clause After the WHERE clause A database was queried with the following command: SELECT name. b. b. c. name FROM employee WHERE emp_id NOT IN (SELECT emp_id FROM employee WHERE depart_id = 30 AND job = 'CLERK'). c. 11. dept_id SELECT AVG(salary) 12.
Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables given below: EMPLOYEES --------------------EMPLOYEE_ID NUMBER FIRST_NAME VARCHAR2 (20) LAST_NAME VARCHAR2 (20) HIRE_DATE DATE NEW_EMPLOYEES -----------------------EMPLOYEE_ID NUMBER NAME VARCHAR2 (40) Primary Key 4. The table is currently empty. d. Which of the following SQL statements should be used to remove a view called EMP_DEPT_VU from the schema? DROP emp_dept_vu. a.1. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id). b. b. ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id). b. d. DELETE VIEW emp_dept_vu. 3. DELETE emp_dept_vu. b. DELETE FROM employees WHERE employee_id IN (SELECT employee_id FROM new_employees WHERE name ='Carrey'). e. c. The STUDENTS table needs to be modified to add a primary key on the STUDENT_ID column. DELETE FROM employees WHERE employee_id = (SELECT employee_id FROM employees). d. d. c. c. REMOVE emp_dept_vu. e. c. a. Which of the following statements will accomplish the task? ALTER TABLE students ADD PRIMARY KEY student_id. ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id). a. Which Data Dictionary view holds information about the column in a view? USER_VIEWS USER_VIEW_COLUMNS USER_TAB_COLUMNS USER_ALL_COLUMNS 2. REMOVE VIEW emp_dept_vu. DELETE * FROM employees WHERE employee_id IN (SELECT employee_id FROM new_employees WHERE last_name ='Carrey' . DELETE * FROM employees WHERE employee_id = (SELECT employee_id FROM new_employees). Primary Key Which of the following DELETE statements is valid? a. DROP VIEW emp_dept_vu. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id. f.
What is the syntax for removing a PRIMARY KEY constraint and all its dependent constraints? ALTER TABLE table_name REMOVE CONSTRAINT PRIMARY KEY CASCADE. CREATE SEQUENCE. f. . d. but will NOT enable the PRIMARY KEY constraint The statement will achieve the desired results The statement will execute. The PRIMARY KEY constraint was disabled on the ID column in the Product table and all the values in the Product table were updated. a. CREATE PROCEDURE TO joe CREATE USER joe a. b. an error message should be returned. CREATE TABLE time (time_id NUMBER(9)). A user JOE needs to be created and this user should be allowed to create and drop tables in any schema. The constraint is to be enabled and it should be verified that the new ID column values do not violate the constraint. If any of the ID column values do not conform to the constraint. a. GRANT DROP ANY TABLE. CREATE TABLE datetime (time_id NUMBER(9)). CREATE TABLE $time (time_id NUMBER(9)). d. c. 6. b. b. e. b. e. He should be able to create procedures and sequences only in his schema. a.5. c. but will NOT verify that values in the ID column do NOT violate the constraint The statement will return a syntax error 9. Which of the following CREATE TABLE statements will fail? CREATE TABLE time1 (time1 NUMBER(9)). Evaluate the following statement: ALTER TABLE product ENABLE CONSTRAINT product_id_pk. The statement will execute. c. d. CREATE TABLE date (time_id NUMBER(9)). Which statement is true? a. ALTER TABLE table_name DROP PRIMARY KEY CASCADE. A PRIMARY KEY constraint CANNOT be removed if it has dependent constraints 7. c. b. Which statement type would be used to remove transactions more than one year old from the TRX table? DCL DML DDL TCL DRL 8. d. Which script should be used to achieve these results? CREATE USER joe IDENTIFIED BY joe123. ALTER TABLE table_name DISABLE CONSTRAINT PRIMARY KEY CASCADE. CREATE TABLE time* (time_id NUMBER(9)).
GRANT select. insert. d. Anyone given this MANAGER role should be able to pass those privileges on to others. DROP ANY TABLE. insert. CREATE FORCE VIEW first_vu ORDER BY last_name. a. first_name FROM employee AS SELECT first_name ||' '|| last_name "Employee Names" 12. c. A view was created with the following command: CREATE FORCE VIEW first_vu AS SELECT first_name ||' '|| last_name "Employee Names" FROM employee ORDER BY last_name. Which statement about a sequence is true? A sequence can only be used to create a primary key value One sequence can be used for multiple tables in the same schema Creating a sequence causes sequence numbers are stored in a table A sequence slows down the efficiency of accessing sequence values cached in memory 11. GRANT CREATE TABLE. update ON student_grades TO manager WITH GRANT OPTION a. c. insert. d. d. Which clause causes an error? a. CREATE PROCEDURE TO joe c. GRANT CREATE SESSION. modify ON student_grades TO manager WITH GRANT OPTION. 10. CREATE PROCEDURE TO joe CREATE USER joe IDENTIFIED BY joe123. b. b. c.IDENTIFIED BY joe123. update ON student_grades TO manager. b. Which statement accomplishes this? GRANT select. CREATE SEQUENCE. update ON student_grades TO ROLE manager GRANT select. The MANAGER role should be given the ability to select from insert into and modify existing rows in the STUDENT_GRADES table. d. insert. DROP TABLE. CREATE PROCEDURE TO joe CREATE USER joe IDENTIFIED BY joe123. CREATE ANY TABLE. GRANT CREATE SESSION. CREATE SEQUENCE. first_name. CREATE SEQUENCE. GRANT select. . DROP ANY TABLE.
d.'YEAR)"DATE: from DUAL. d. a. The use of rowed & Only an inline view a GROUP BY clause & Only an inline view an ORDER BY clause & An inline view and an outer query None of the above Examine the code given below: 5.5 OR salary > 23000 Which of the following statement is correct with regard to this code? a. Select TRUNC(To_Date('09-Jan-02. d. Top N analysis requires ____________ and ____________. b. Which type of join should be written to perform an outer join of tables A and B that returns all rows from B? Any outer join A left outer join A cross join A right outer join An inner join 3.000: It returns employees who have 50% of salary less than $23.DD-MON-YY. b. How many join conditions should be there to avoid a Cartesian Join for joining three tables? 1 2 3 None of the above 4. What is the correct use of the Trunc command on a date? TRUNC=To_Date('09-Jan-02. c.000: It returns employees who have 50% commission rate or salary greater than $23.1. b. e.'YEAR'. d. c. Date =TRUNC(To_DATE('09-Jan-02'.DD-MON-YY.'DD-MON-YY'). a.000: None of the above 6. SELECT employee_id FROM employees WHERE commission_pct=. b.'YEAR')."Date" from Dual. d. c. c.YEAR')) "DATE" from Dual. 2. c. The STUDENT_GRADES table has the following columns: .'DD-MON-YY'). SELECT TRUNC(TO_DATE('12-Feb-99'. a. b. a. 'YEAR') "Date " FROM DUAL. It returns employees who have 50% of the salary greater than $23.
3) Which of the following statements finds the highest Grade Point Average (GPA) per semester? a. 9. e. c. Where is the GROUP BY clause statement placed in a SELECT statement that includes a WHERE clause? Immediately after the SELECT clause Before the WHERE clause After the ORDER BY clause After the WHERE clause 10. Which of the following SELECT statements will get the result 'elloworld' from the string 'HelloWorld'? SELECT SUBSTR ('HelloWorld'. SELECT (gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT NULL. b.1) FROM dual. 1.1) FROM dual. c.STUDENT_ID NUMBER (12) SEMESTER_END DATE GPA NUMBER (4. c. Which of the following tasks can be performed by using the TO_CHAR function? Convert '10'to 10 Convert 10 to '10' Convert 'TEN' to 10 Convert a date to a character expression Convert a character expression to a date 8. b. a. d. d.1) FROM dual. SELECT LOWER (SUBSTR ('HellowWorld'. SELECT LOWER (TRIM ('H' FROM 'Hello World')) FROM dual. c. a. SELECT LOWER (SUBSTR('HellowWorld'. b. 2. Which operators can be used in an outer join condition? .1) FROM dual. SELECT INITCAP(TRIM('HellowWorld'. d. SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL. e. 2. 7. a. SELECT MAX(gpa) GROUP BY semester_end WHERE gpa IS NOT NULL FROM student_grades. e. SELECT MAX(gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT NULL. SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL GROUP BY semester_end. d. b.
-1). SELECT ROUND (TRUNC (MOD (1600. d.a. What will be displayed? a. 10). b.00 An error statement . b. a. = OR IN AND 11. c. d. 0 1 0. Which type of view is implemented as a subquery embedded in the FROM clause of a SELECT statement and is identified by an alias? Simple Inline Complex Nested Evaluate the following SQL statement: 12. b. c. c. d. 2) FROM dual.
but on at least two such aircrafts. departs: time. Find the names of pilots certified for some Boeing aircraft.m. Find the names of pilots whose salary is less than the price of the cheapest route from Los Angeles to Honolulu. Print the enames of pilots who can operate planes with cruisingrange greater than 3000 miles but are not certified on any Boeing aircraft. and only pilots are certified to fly.000. arrives: time. Compute the difference between the average salary of a pilot and the average salary of all employees (including pilots).000. Find the names of aircraft such that all pilots certified to operate them earn more than $80. salary: integer) Note that the Employees relation describes pilots and other kinds of employees aswell. For each pilot who is certified for more than three aircraft. List the choice of departure times from Madison if the customer wants to arrive in New York by 6 p. g. Print the names of employees who are certified only on aircrafts with cruising range longer than 1000 miles. h. For all aircraft with cruisingrange over 1000 miles. k. aname: string. find the eid and the maximum cruisingrange of the aircraft for which she or he is certified.Write each of the following queries in SQL. a. . l. to: string.SQL Queries Questions 1. from: string. cruisingrange: integer) Certified(eid: integer. b. c. Print the names of employees who are certified only on aircrafts with cruising range longer than 1000 miles. d. price: integer) Aircraft(aid: integer. A customer wants to travel from Madison to New York with no more than two changes of flight. f. ename: string. j. m. distance: integer. i. e. Find the aids of all aircraft that can be used on routes from Los Angeles to Chicago. The following relations keep track of airline flight information: Flights(flno: integer. aid: integer) Employees(eid: integer. every pilot is certified for some aircraft. find the name of the aircraft and the average salary of all pilots certified for this aircraft. Identify the routes that can be piloted by every pilot who makes more than $100. Print the name and salary of every nonpilot whose salary is more than the average salary for pilots.
certified c where e. d)select a.ename from employees e where e.flno from flights f where f.aircraft a where e.from =' Los Angeles' and f.aname.eid.cruisingrange) from certified c.aname=' Boeing aircraft'. .aid group by c. Print the names of employees who are certified only on aircrafts with cruising range longer than 1000 miles and who are certified on some Boeing aircraft.employees e.aid=a.aid from aircraft a where a.aid and e.aid in(f.salary) from aircraft a.to = ' Honolulu').e.eid=c.salary >$80.certified c where e.eid having count(*)>3.eid=c.avg(e.ename. a)select a.aname.ename from employees e .aid and a.aid=a.aircraft a where c.eid=c.salary <(select f.000.aid and cruisingrange> 1000 group by a.aid=a. f)select a.from=' Los Angeles' and f.price from flights f where f. b)select c.eid and c.eid and c.to='chicago').n.employees e. c)select e.e.salary from aircraft a.eid and c.max(a.aid=a. e)select e.certified c.aname.
did: integer.ename from emp e where e.works w where e.works w.did). pct_time: integer) Dept(did: integer.dname='software'. salary: real) Works(eid: integer. managerid: integer) Write the following queries in SQL: a.budget from dept d.d.e.sal > all(select d.e.2. An employee can work in more than one department. For each department with more than 20 full-time-equivalent employees (i. d)select d. f.eid=w. Find the managerids of managers who manage only departments with budgets greater than $1 million.ename. where the part-time and full-time employees add up to at least that many fulltime employees). Consider the following relational schema. If a manager manages more than one department. c. ename: string. h.dname='Hardware' and d.managerid.age from emp e. Find the managerids of managers who control more than $5 million. dname: string. g. d.eid and w. Print the name of each employee whose salary exceeds the budget of all of the departments that he or she works in. he or she controls the sum of all the budgets for those departments. b.did and d. Find the enames of managers who manage only departments with budgets larger than $1 million. Emp(eid: integer.eid=w. c)select e. a)Select e.did=d. Find the enames of managers who manage the departments with the largest budgets. age: integer. but at least one department with budget less than $5 million.eid and w.did=d. Find the managerids of managers who control the largest amounts. Print the names and ages of each employee who works in both the Hardware department and the Software department..dept d where e. print the did together with the number of employees that work in that department. the pct_time filed of the Works relation shows the percentage of time that a given employee works in a given department. e.dname from . budget: real.
dept d where d.budget) from dept1)).dept d where e. h)select e.000.budget>1. .budget>10.managerid group by e.00.ename from emp e. f)select managerid .00.000 )and (d.00.ename from emp e where e.eid having (d.eid in(select d.budget<5.000).eid=d.budget= (select max(d1. e)select e.managerid from dept d where d.sum(budget)from dept group by managerid having sum(budget)>500000.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.