PostgreSQL Database Quiz Questions

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

In PostgreSQL, the ROUND() function can only be used with integers.

Q2
True / False

The ABS() function in PostgreSQL returns the absolute value of a numeric input.

Q3
True / False

In PostgreSQL, the MOD() function is used to calculate the remainder of a division operation.

Q4
True / False

The CEIL() function in PostgreSQL always rounds a number up to the nearest integer.

Q5
True / False

PostgreSQL’s TRUNC() function can only truncate numbers to an integer.

Q6
True / False

The POWER() function in PostgreSQL raises a number to the power of another number.

Q7
True / False

In PostgreSQL, the SQRT() function can be used to find the square root of a negative number

Q8
True / False

PostgreSQL’s LOG() function can take a base and a number as arguments.

Q9
True / False

The RANDOM() function in PostgreSQL generates a random number between 0 and 1.

Q10
True / False

In PostgreSQL, using the FLOOR() function will always return a value less than or equal to the original number.

Q11
Single Choice

In PostgreSQL, which function would you use to round a numeric value to the nearest integer?

Q12
Single Choice

What does the ABS() function return when used in PostgreSQL?

Q13
Single Choice

How do you calculate the square root of a number in PostgreSQL?

Q14
Single Choice

What is the output of the following PostgreSQL query?

SQL Code
SELECT CEIL(4.2);
Q15
Single Choice

Which PostgreSQL function would you use to truncate a numeric value to a specific number of decimal places?

Q16
Single Choice

What does the following PostgreSQL query return?

SQL Code
SELECT MOD(10, 3);
Q17
Single Choice

What is the result of the following PostgreSQL query?

SQL Code
SELECT POWER(2, 3);
Q18
Single Choice

How can you calculate the natural logarithm of a number in PostgreSQL?

Q19
Single Choice

What will the following PostgreSQL query return?

SQL Code
SELECT FLOOR(8.7);
Q20
Single Choice

In PostgreSQL, what does the following query return when using the CUME_DIST() function?

SQL Code
SELECT CUME_DIST() OVER (ORDER BY salary) FROM employees;
Q21
Multiple Choice

Which SQL queries correctly use the ROUND function to round numeric values in PostgreSQL?

Q22
Multiple Choice

Which SQL queries correctly use the CEIL function to round up numeric values in PostgreSQL?

Q23
Multiple Choice

Which SQL queries correctly use the FLOOR function to round down numeric values in PostgreSQL?

Q24
Multiple Choice

Which SQL queries correctly use the MOD function to find the remainder of a division in PostgreSQL?

Q25
Multiple Choice

Which SQL queries correctly use the ABS function to get the absolute value of a number in PostgreSQL?

Q26
Multiple Choice

Which SQL queries correctly use the POWER function to raise a number to a specific power in PostgreSQL?

Q27
Multiple Choice

Which SQL queries correctly use the SQRT function to calculate the square root in PostgreSQL?

Q28
Multiple Choice

Which SQL queries correctly use the LOG function to calculate the logarithm in PostgreSQL?

Q29
Multiple Choice

Which SQL queries correctly use the EXP function to calculate the exponential value in PostgreSQL?

Q30
Multiple Choice

Which SQL queries correctly use the SIGN function to determine the sign of a number in PostgreSQL?