• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 15 pages
Exam (elaborations)

Dbms130 - S09-S16

Document preview thumbnail
Preview 2 out of 15 pages

Exam of 15 pages for the course DBMS130 - S09-S16 at DBMS130 - S09-S16 (DBMS130 - S09-S16)

Content preview

DBMS130 - S09-S16 Q&A
How many records are returned by the following query?


SELECT SUM(SALARY), DEPARTMENT_ID FROM EMPLOYEES

GROUP BY DEPARTMENT_ID;



Assume there are 11 nonnull and 1 null unique DEPARTMENT_ID values. All records
have a nonnull SALARY value. - (correct answer)12



What value is returned after executing the following statement?



SELECT AVG(NVL(SALARY,100)) FROM EMPLOYEES;



Assume there are ten employee records and each contains a SALARY value of 100,
except for one employee, who has a null value in the SALARY field. - (correct
answer)100



What result is returned by the following statement? SELECT COUNT(*) FROM DUAL; -
(correct answer)1



How many rows of data are returned after executing the following statement?


SELECT DEPT_ID, SUM(SALARY) FROM EMP

GROUP BY DEPT_ID HAVING SUM(NVL(SALARY,100)) > 400;



Assume the EMP table has ten rows and each contains a SALARY value of 100, except
for one, which has a null value in the SALARY field. The first and second five rows have
DEPT_ID values of 10 and 20, respectively. - (correct answer)2 rows

, Which values are returned after executing the following statement?



SELECT COUNT(*), COUNT(SALARY) FROM EMPLOYEES;



Assume there are 10 employee records and each contains a SALARY value of 100,
except for 1, which has a null value in their SALARY field. - (correct answer)10 and 9



Which of the following statements are syntactically correct? - (correct answer)SELECT *
FROM EMPLOYEES E JOIN DEPARTMENTS D USING (DEPARTMENT_ID);



Choose one correct statement regarding the following query:



SELECT * FROM EMPLOYEES E

JOIN DEPARTMENTS D ON (D.DEPARTMENT_ID=E.DEPARTMENT_ID) JOIN

LOCATIONS L ON (L.LOCATION_ID =D.LOCATION_ID); - (correct answer)The
JOIN...ON clause may be used for joins between multiple tables.



If you precede the subquery by the ____ operator, the condition is true only if it satisfies
all values produced by the subquery. - (correct answer)ALL



You create an alias by typing the name of the table, pressing the ____, and then typing
the name of the alias. - (correct answer)Spacebar


What are the distinguishing characteristics of a scalar subquery? - (correct answer)A
scalar subquery returns one row.

A scalar subquery returns one column.



Which of the following statements are equivalent? - (correct answer)select employee_id
from employees where salary < all (select salary from employees where
department_id= 10);

Document information

Uploaded on
November 6, 2024
Number of pages
15
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$9.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
douglasmugwe82
5.0
(1)
Sold
2
Followers
0
Items
4215
Last sold
1 year ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions