
Lab 5 Review Quiz - Functions and Subqueries

Quiz
•
Computers
•
University
•
Hard
Nicole Berard
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a single-row SQL function that converts a string to uppercase in Oracle SQL?
LOWER
UPPER
INITCAP
CONCAT
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the COUNT function in SQL?
To count the number of columns in a table
To count the number of rows in a table
To count the number of distinct values in a column
To count the number of characters in a string
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following SQL statements correctly uses a subquery to find employees who earn more than the average salary?
SELECT * FROM employees WHERE salary > (SELECT AVG(salary) FROM employees);
SELECT * FROM employees WHERE salary > AVG(salary);
SELECT * FROM employees WHERE salary > ALL (SELECT salary FROM employees);
SELECT * FROM employees WHERE salary > (SELECT MAX(salary) FROM employees);
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a correlated subquery, which of the following is true?
The subquery is executed once for the entire query
The subquery is executed once for each row processed by the outer query
The subquery is executed only if the outer query returns no results
The subquery is executed only if the outer query returns results
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of an aggregate function in SQL?
LENGTH
SUM
SUBSTR
INSTR
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following SQL statement do? SELECT department_id, MAX(salary) FROM employees GROUP BY department_id;
It selects the maximum salary from the employees table
It selects the department ID and the maximum salary for each department
It selects the department ID and the total salary for each department
It selects the department ID and the average salary for each department
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following SQL functions can be used to find the remainder of a division operation?
MOD
DIV
REM
ROUND
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
FIT 9132 Week 8

Quiz
•
University
12 questions
SQL Questions

Quiz
•
University
10 questions
sql fundamendals

Quiz
•
University
10 questions
DBMS 1

Quiz
•
University
10 questions
SYS 1591

Quiz
•
University
10 questions
DBMS Lab Quiz 1 2B3

Quiz
•
University
15 questions
DBMS_Quiz_1

Quiz
•
University
14 questions
SQL MCQ

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade