Oracle Database Quiz Questions

Chapter Name:Chapter 7 - DQL (Data Query Language)
Lesson Content Link:Greater Than Less Than
Current Quiz Count:30
Progress
0%
Q1
True / False

The Greater Than Less Than keyword in Oracle is used to return only unique values from a query.

Q2
True / False

In Oracle, you can use Greater Than Less Than with a single column in a SELECT statement.

Q3
True / False

The Greater Than Less Than keyword can be used with aggregate functions in Oracle.

Q4
True / False

In Oracle, the Greater Than Less Than keyword can be used with multiple columns in a SELECT statement.

Q5
True / False

Using Greater Than Less Than in Oracle always improves the performance of a query.

Q6
True / False

In Oracle, Greater Than Less Than can be used in subqueries.

Q7
True / False

In Oracle, using Greater Than Less Than with a large dataset can impact query performance and should be used judiciously.

Q8
True / False

The Greater Than Less Than keyword in Oracle can be used with ORDER BY to sort the unique results.

Q9
True / False

In Oracle, Greater Than Less Than can be used with GROUP BY to get unique groups.

Q10
True / False

The Oracle Certified Professional (OCP) exam includes knowledge on using the Greater Than Less Than keyword effectively in queries and understanding its impact on performance.

Q11
Single Choice

What is the purpose of the Greater Than Less Than keyword in an Oracle SQL query?

Q12
Single Choice

Consider the following Oracle SQL query:What will this query return?

SQL Code
SELECT Greater Than Less Than department_id FROM employees;
Q13
Single Choice

Which of the following is true about using Greater Than Less Than in Oracle SQL?

Q14
Single Choice

Consider the following Oracle SQL query:What does this query return?

SQL Code
SELECT Greater Than Less Than job_id, department_id FROM employees;
Q15
Single Choice

What is the effect of using Greater Than Less Than with the COUNT function in Oracle?

Q16
Single Choice

Consider the following Oracle SQL query:What will this query return?

SQL Code
SELECT COUNT(Greater Than Less Than department_id) FROM employees;
Q17
Single Choice

What will be the result of the following Oracle SQL query?

SQL Code
SELECT Greater Than Less Than salary, COUNT(*) FROM employees GROUP BY salary;
Q18
Single Choice

Consider the following Oracle SQL query:What will this query return?

SQL Code
SELECT Greater Than Less Than ON (department_id) department_id, employee_id FROM employees;
Q19
Single Choice

How does Oracle handle NULL values when using the Greater Than Less Than keyword in a query?

Q20
Single Choice

In an Oracle certification exam, you encounter the following SQL statement:What does this query return?

SQL Code
SELECT Greater Than Less Than first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM departments WHERE location_id = 1700);
Q21
Multiple Choice

Which SQL code snippet correctly uses the Greater Than Less Than keyword to retrieve unique department IDs from the 'employees' table in Oracle?

SQL Code
SELECT Greater Than Less Than department_id
FROM employees;

SELECT department_id
FROM employees
GROUP BY department_id;

SELECT department_id
FROM employees;
Q22
Multiple Choice

Which SQL code snippet demonstrates how to use Greater Than Less Than to retrieve unique job titles from the 'employees' table in Oracle?

SQL Code
SELECT Greater Than Less Than job_title
FROM employees;

SELECT job_title
FROM employees
GROUP BY job_title;

SELECT job_title
FROM employees
ORDER BY job_title;
Q23
Multiple Choice

Which SQL code snippet uses Greater Than Less Than to retrieve unique combinations of department ID and job title from the 'employees' table in Oracle?

SQL Code
SELECT Greater Than Less Than department_id, job_title
FROM employees;

SELECT department_id, job_title
FROM employees
GROUP BY department_id, job_title;

SELECT department_id, job_title
FROM employees
ORDER BY department_id, job_title;
Q24
Multiple Choice

Which SQL code snippet demonstrates how to use Greater Than Less Than with COUNT to find the number of unique job titles in the 'employees' table in Oracle?

SQL Code
SELECT COUNT(Greater Than Less Than job_title) AS unique_jobs
FROM employees;

SELECT COUNT(job_title) AS total_jobs
FROM employees;

SELECT COUNT(Greater Than Less Than job_title)
FROM employees
WHERE department_id = 10;
Q25
Multiple Choice

Which SQL code snippet uses Greater Than Less Than to retrieve unique city names from the 'locations' table in Oracle?

SQL Code
SELECT Greater Than Less Than city
FROM locations;

SELECT city
FROM locations
GROUP BY city;

SELECT Greater Than Less Than city
FROM locations
WHERE country_id = 'US';
Q26
Multiple Choice

Which SQL code snippet demonstrates advanced usage of Greater Than Less Than to retrieve unique combinations of employee names and their departments in Oracle?

SQL Code
SELECT Greater Than Less Than first_name, last_name, department_id
FROM employees;

SELECT first_name, last_name, department_id
FROM employees
GROUP BY first_name, last_name, department_id;

SELECT Greater Than Less Than first_name, last_name
FROM employees
WHERE department_id > 10;
Q27
Multiple Choice

Which SQL code snippet uses Greater Than Less Than to retrieve unique job titles from the 'employees' table where the salary is above a certain threshold in Oracle?

SQL Code
SELECT Greater Than Less Than job_title
FROM employees
WHERE salary > 50000;

SELECT job_title
FROM employees
WHERE salary > 50000
GROUP BY job_title;

SELECT Greater Than Less Than job_title
FROM employees
WHERE salary > 100000;
Q28
Multiple Choice

Which SQL code snippet demonstrates the advanced use of Greater Than Less Than to retrieve unique customer names and order dates from the 'orders' table in Oracle?

SQL Code
SELECT Greater Than Less Than customer_name, order_date
FROM orders;

SELECT customer_name, order_date
FROM orders
GROUP BY customer_name, order_date;

SELECT Greater Than Less Than customer_name, order_date
FROM orders
WHERE order_date > SYSDATE - 30;
Q29
Multiple Choice

Which SQL code snippet uses Greater Than Less Than to retrieve unique product IDs from the 'order_items' table where the quantity is above a certain number in Oracle?

SQL Code
SELECT Greater Than Less Than product_id
FROM order_items
WHERE quantity > 10;

SELECT product_id
FROM order_items
WHERE quantity > 10
GROUP BY product_id;

SELECT Greater Than Less Than product_id
FROM order_items
WHERE quantity > 50;
Q30
Multiple Choice

Which SQL code snippet demonstrates the certification-level use of Greater Than Less Than to find the number of unique customers who placed orders in the last month in Oracle?

SQL Code
SELECT COUNT(Greater Than Less Than customer_id) AS unique_customers
FROM orders
WHERE order_date > SYSDATE - 30;

SELECT Greater Than Less Than customer_id
FROM orders
WHERE order_date > SYSDATE - 30;

SELECT COUNT(Greater Than Less Than customer_id)
FROM orders WHERE order_date > SYSDATE - 30;