Oracle Database Quiz Questions

Course Name:Oracle
Chapter Name:Chapter 7 - DQL (Data Query Language)
Lesson Content Link:Arithmetic Operators
Current Quiz Count:30
Progress
0%
Q1
True / False

In Oracle, the addition operator (+) is used to add two numeric values.

Q2
True / False

In Oracle, the subtraction operator (-) can be used to subtract one numeric value from another.

Q3
True / False

In Oracle, the multiplication operator (*) is used to multiply two numeric values.

Q4
True / False

In Oracle, the division operator (/) can be used to divide one numeric value by another.

Q5
True / False

In Oracle, using the modulus operator (%) returns the remainder of a division operation.

Q6
True / False

In Oracle, arithmetic operators can be used with both numeric and character data types.

Q7
True / False

In Oracle, the precedence of arithmetic operators follows the standard mathematical order: multiplication and division before addition and subtraction.

Q8
True / False

In Oracle, parentheses can be used to override the default precedence of arithmetic operators.

Q9
True / False

In Oracle, performing arithmetic operations with NULL values will always result in NULL.

Q10
True / False

The Oracle Certified Professional (OCP) exam includes knowledge on using arithmetic operators effectively, understanding their precedence, and handling special cases like division by zero and NULL values in SQL queries.

Q11
Single Choice

Which of the following is an arithmetic operator in Oracle SQL?

Q12
Single Choice

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

SQL Code
SELECT 10 - 4 FROM dual;
Q13
Single Choice

Which Oracle SQL statement correctly calculates the product of two numbers, 7 and 3?

Q14
Single Choice

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

SQL Code
SELECT salary + bonus FROM employees;
Q15
Single Choice

Which Oracle SQL arithmetic operator would you use to find the remainder when dividing two numbers?

Q16
Single Choice

Given the Oracle SQL query:What will be the result?

Q17
Single Choice

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

SQL Code
SELECT 20 * (3 + 2) - 10 / 2 FROM dual;
Q18
Single Choice

Consider this Oracle SQL query:What does the query calculate?

SQL Code
SELECT (salary * 12) + bonus - (tax / 2) AS annual_income
FROM employees;
Q19
Single Choice

Which of the following Oracle SQL expressions would you use to calculate the average value of two columns, column1 and column2?

Q20
Single Choice

What is the result of the following Oracle SQL expression?

SQL Code
SELECT (25 + 10) * 2 - 50 / (5 - 3) FROM dual;
Q21
Multiple Choice

Which SQL code snippet uses arithmetic operators to calculate the total compensation by adding salary and commission in Oracle?

SQL Code
SELECT employee_id, salary + commission_pct AS total_compensation
FROM employees
WHERE department_id = 10;

SELECT employee_id, salary + commission_pct AS total_compensation
FROM employees
WHERE department_id = 10;

SELECT employee_id, salary + commission_pct AS total_compensation
FROM employees
WHERE department_id = 10;
Q22
Multiple Choice

Which SQL code snippet demonstrates the use of arithmetic operators to calculate the difference between the highest and lowest salary in a department in Oracle?

SQL Code
SELECT department_id, MAX(salary) - MIN(salary) AS salary_difference
FROM employees
GROUP BY department_id;

SELECT department_id, MAX(salary) - MIN(salary) AS salary_difference
FROM employees
GROUP BY department_id;

SELECT department_id, MAX(salary) - MIN(salary) AS salary_difference
FROM employees
GROUP BY department_id;
Q23
Multiple Choice

Which SQL code snippet uses arithmetic operators to calculate the annual salary of employees by multiplying their monthly salary by 12 in Oracle?

SQL Code
SELECT employee_id, salary * 12 AS annual_salary
FROM employees
WHERE department_id = 20;

SELECT employee_id, salary * 12 AS annual_salary
FROM employees
WHERE department_id = 20;

SELECT employee_id, salary * 12 AS annual_salary
FROM employees
WHERE department_id = 20;
Q24
Multiple Choice

Which SQL code snippet demonstrates the use of arithmetic operators to calculate the average monthly sales by dividing total sales by the number of months in Oracle?

SQL Code
SELECT product_id, total_sales / 12 AS average_monthly_sales
FROM sales
WHERE year = 2023;

SELECT product_id, total_sales / 12 AS average_monthly_sales
FROM sales
WHERE year = 2023;

SELECT product_id, total_sales / 12 AS average_monthly_sales
FROM sales
WHERE year = 2023;
Q25
Multiple Choice

Which SQL code snippet uses arithmetic operators to adjust employee salaries by adding a 10% increase in Oracle?

SQL Code
SELECT employee_id, salary, salary + (salary * 0.10) AS new_salary
FROM employees;

SELECT employee_id, salary, salary + (salary * 0.10) AS new_salary
FROM employees;

SELECT employee_id, salary, salary + (salary * 0.10) AS new_salary
FROM employees;
Q26
Multiple Choice

Which SQL code snippet demonstrates advanced use of arithmetic operators to calculate the net profit by subtracting total expenses from total revenue in Oracle?

SQL Code
SELECT total_revenue - total_expenses AS net_profit
FROM financials
WHERE year = 2023;

SELECT total_revenue - total_expenses AS net_profit
FROM financials
WHERE year = 2023;

SELECT total_revenue - total_expenses AS net_profit
FROM financials
WHERE year = 2023;
Q27
Multiple Choice

Which SQL code snippet demonstrates advanced use of arithmetic operators to calculate the percentage increase in sales from one year to the next in Oracle?

SQL Code
SELECT ((sales_2023 - sales_2022) / sales_2022) * 100 AS percentage_increase
FROM sales_data;

SELECT ((sales_2023 - sales_2022) / sales_2022) * 100 AS percentage_increase
FROM sales_data;

SELECT ((sales_2023 - sales_2022) / sales_2022) * 100 AS percentage_increase
FROM sales_data;
Q28
Multiple Choice

Which SQL code snippet demonstrates certification-level use of arithmetic operators to calculate the compound annual growth rate (CAGR) in Oracle?

SQL Code
SELECT POWER((end_value / start_value), (1.0 / num_years)) - 1 AS CAGR
FROM financial_growth;

SELECT POWER((end_value / start_value), (1.0 / num_years)) - 1 AS CAGR
FROM financial_growth;

SELECT POWER((end_value / start_value), (1.0 / num_years)) - 1 AS CAGR
FROM financial_growth;
Q29
Multiple Choice

Which SQL code snippet demonstrates certification-level use of arithmetic operators to calculate the return on investment (ROI) in Oracle?

SQL Code
SELECT ((revenue - cost) / cost) * 100 AS ROI
FROM investments;

SELECT ((revenue - cost) / cost) * 100 AS ROI
FROM investments;

SELECT ((revenue - cost) / cost) * 100 AS ROI
FROM investments;
Q30
Multiple Choice

Which SQL code snippet demonstrates certification-level use of arithmetic operators to evaluate the weighted average cost of capital (WACC) in Oracle?

SQL Code
SELECT (debt_ratio * cost_of_debt) + (equity_ratio * cost_of_equity) AS WACC
FROM capital_structure;

SELECT (debt_ratio * cost_of_debt) + (equity_ratio * cost_of_equity) AS WACC
FROM capital_structure;

SELECT (debt_ratio * cost_of_debt) + (equity_ratio * cost_of_equity) AS WACC
FROM capital_structure;