MySQL Database Quiz Questions

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

In MySQL, the + operator can be used to add two numeric values.

Q2
True / False

In MySQL, the * operator is used for division.

Q3
True / False

In MySQL, the - operator can subtract one numeric value from another.

Q4
True / False

In MySQL, using the % operator with two integers returns the quotient of the division.

Q5
True / False

MySQL supports the use of parentheses () to change the precedence of arithmetic operations.

Q6
True / False

In MySQL, 5 / 2 returns 2.5.

Q7
True / False

In MySQL, the DIV operator is used for integer division and discards the fractional part.

Q8
True / False

In MySQL, the expression 10 MOD 3 returns 3.

Q9
True / False

MySQL does not allow the use of arithmetic operators on date values.

Q10
True / False

In MySQL, 7.0 / 2 returns 3.5, demonstrating MySQL's ability to handle floating-point division

Q11
Single Choice

What is the result of the following SQL query?

SQL Code
SELECT 5 + 3 AS result;
Q12
Single Choice

What does the SQL query below return?

SQL Code
SELECT 10 - 4 AS result;
Q13
Single Choice

Which operator is used to multiply numbers in MySQL?

Q14
Single Choice

What will be the output of the following SQL query?

SQL Code
SELECT 12 / 4 AS result;
Q15
Single Choice

Consider the following SQL code:

SQL Code
SELECT 5 * (2 + 3) AS result;
Q16
Single Choice

What does the following SQL statement return?

SQL Code
SELECT 15 % 4 AS result;
Q17
Single Choice

What is the result of this SQL query?

SQL Code
SELECT (8 + 5) * (10 - 4) AS result;
Q18
Single Choice

What will be the result of the following SQL statement?

SQL Code
SELECT (20 - 5) / (2 + 3) AS result;
Q19
Single Choice

Given this SQL statement

SQL Code
SELECT (7 * 5 + 10) / (2 * 3) AS result;
Q20
Single Choice

What will the following SQL query return when executed?

SQL Code
SELECT ROUND(3.14159 * 10 / 3, 2) AS result;
Q21
Multiple Choice

Which SQL query uses the addition operator to calculate the total price by adding tax to the base price?

SQL Code
SELECT product_name, price + tax AS total_price
FROM products;
Q22
Multiple Choice

Identify the SQL query that uses the subtraction operator to find the difference between a product's sale price and its cost price.

SQL Code
SELECT product_name, sale_price - cost_price AS profit
FROM sales;
Q23
Multiple Choice

Which SQL query uses the multiplication operator to calculate the total revenue from the quantity sold?

SQL Code
SELECT product_name, price * quantity_sold AS revenue
FROM sales;
Q24
Multiple Choice

Determine the SQL query that uses the division operator to calculate the average price per unit of a product.

SQL Code
SELECT product_name, total_price / quantity_sold AS price_per_unit
FROM sales;
Q25
Multiple Choice

Which SQL query uses the modulus operator to find the remainder when the total sales amount is divided by the number of units?

SQL Code
SELECT product_name, total_sales % quantity_sold AS remainder
FROM sales;
Q26
Multiple Choice

Which SQL query uses the combination of addition and multiplication operators to calculate the total cost including a percentage tax?

SQL Code
SELECT product_name, price + (price * tax_rate / 100) AS total_cost
FROM products;
Q27
Multiple Choice

Identify the SQL query that calculates the compound interest using arithmetic operators.

SQL Code
SELECT principal * POW(1 + rate / 100, time) AS compound_interest
FROM investments;
Q28
Multiple Choice

Which SQL query uses subtraction and division operators to calculate the percentage profit margin for a product?

SQL Code
SELECT product_name, ((sale_price - cost_price) / sale_price) * 100 AS profit_margin
FROM sales;
Q29
Multiple Choice

Determine the SQL query that uses the arithmetic operators to calculate the final amount after applying a discount and adding tax.

SQL Code
SELECT product_name, (price - discount) + ((price - discount) * tax_rate / 100) AS final_amount
FROM products;
Q30
Multiple Choice

Which SQL query uses arithmetic operators to calculate the breakeven point where total revenue equals total costs?

SQL Code
SELECT (fixed_costs / (price - variable_costs)) AS breakeven_point
FROM business_data;