Consider the following query:
SELECT COUNT(*) FROM employees;
What does this query return?
DBMS-Select Statement
Quiz
•
Computers
•
University
•
Hard
KarunaiMuthu SriRam
Used 3+ times
FREE Resource
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following query:
SELECT COUNT(*) FROM employees;
What does this query return?
The number of employees in the "employees" table.
The names of all employees in the "employees" table.
The average salary of employees.
An error because COUNT(*) is not a valid function.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following query:
SELECT first_name || ' ' || last_name AS full_name FROM employees WHERE department_id = 30;
What does this query return?
The first name of all employees in department 30.
The last name of all employees in department 30.
The full name (concatenation of first and last names) of employees in department 30.
An error because the concatenation operator (||) is not allowed.
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following query:
SELECT AVG(salary) FROM employees GROUP BY department_id;
What does this query return?
The average salary of all employees.
The average salary for each department.
An error because you cannot use AVG() with GROUP BY.
The total salary for each department.
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following query:
SELECT employee_id, last_name FROM employees WHERE salary > 50000;
What does this query return?
All employee IDs and last names.
All employee IDs and last names of employees with a salary greater than $50,000.
An error because employee_id is not a valid column.
All employees with a salary greater than $50,000.
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following query:
SELECT DISTINCT department_id FROM employees;
What does this query return?
A list of all unique department IDs.
A list of all department IDs, including duplicates.
An error because DISTINCT cannot be used with SELECT.
A list of all employee IDs.
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following query:
SELECT employee_id, salary * 12 AS annual_salary FROM employees;
What does this query return?
The monthly salary of all employees.
The annual salary (12 times the monthly salary) of all employees.
An error because you cannot use arithmetic operations in SELECT.
The sum of all annual salaries.
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following query:
SELECT department_id, COUNT(*) FROM employees GROUP BY department_id HAVING COUNT(*) > 5;
What does this query return?
The number of employees in each department.
An error because HAVING cannot be used with COUNT(*).
The number of departments with more than 5 employees.
The department IDs with more than 5 employees.
50 questions
Query Processing and Optimization
Quiz
•
University
49 questions
Advance Database System
Quiz
•
University
49 questions
đề 1
Quiz
•
University
49 questions
TSW II intercorso
Quiz
•
University
45 questions
DBMS endterm
Quiz
•
University
51 questions
TESTE 3TIG
Quiz
•
12th Grade - University
50 questions
DBMS-CCE 1_B.Sc-4_13-02-25
Quiz
•
University
50 questions
RESTful API exam
Quiz
•
University
20 questions
math review
Quiz
•
4th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
10 questions
Human Body Systems and Functions
Interactive video
•
6th - 8th Grade
19 questions
Math Review
Quiz
•
3rd Grade
45 questions
7th Grade Math EOG Review
Quiz
•
7th Grade
20 questions
Summer
Quiz
•
KG - University
6 questions
Railroad Operations and Classifications Quiz
Quiz
•
University
47 questions
2nd Semester 2025 Map Final
Quiz
•
KG - University
43 questions
Science 5th Grade EOG Review #3
Quiz
•
KG - University
24 questions
Cartoon Characters
Quiz
•
KG - University
9 questions
What is your personality?
Quiz
•
University
10 questions
El Presente
Quiz
•
1st Grade - University
32 questions
NC Biology EOC Review : Heredity, Genetics, Biotechnology
Quiz
•
KG - University