Lab 5 Review Quiz - Functions and Subqueries

Lab 5 Review Quiz - Functions and Subqueries

University

10 Qs

quiz-placeholder

Similar activities

@tbinh1768/TIN ĐS HK1

@tbinh1768/TIN ĐS HK1

11th Grade - University

11 Qs

Câu hỏi về SQL

Câu hỏi về SQL

11th Grade - University

12 Qs

DBMS_Quiz_1

DBMS_Quiz_1

University

15 Qs

U3.4. CallableStatements (JDBC)

U3.4. CallableStatements (JDBC)

University

14 Qs

Data type in PL/SQL

Data type in PL/SQL

University

10 Qs

FIT 9132 Week 10

FIT 9132 Week 10

University

12 Qs

FIT 9132 Week 8

FIT 9132 Week 8

University

14 Qs

ITPC 116 Section 6

ITPC 116 Section 6

University

10 Qs

Lab 5 Review Quiz - Functions and Subqueries

Lab 5 Review Quiz - Functions and Subqueries

Assessment

Quiz

Computers

University

Hard

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?