PostgreSQL Database Quiz Questions

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

In PostgreSQL, the > operator is used to compare if one value is greater than another.

Q2
True / False

In PostgreSQL, the < operator is used to compare if one value is less than another.

Q3
True / False

In PostgreSQL, the expression 5 > 3 evaluates to FALSE.

Q4
True / False

In PostgreSQL, the > and < operators can be used to compare both numeric and date values.

Q5
True / False

In PostgreSQL, NULL > 0 and NULL < 0 both evaluate to FALSE.

Q6
True / False

In PostgreSQL, the query SELECT * FROM table WHERE column > 100 returns rows where the column value is greater than 100.

Q7
True / False

In PostgreSQL, the > and < operators can be combined with the BETWEEN operator to check for a range of values.

Q8
True / False

In PostgreSQL, the expression column1 > column2 will always evaluate to TRUE if column1 and column2 contain the same values.

Q9
True / False

In PostgreSQL, using > or < operators in ORDER BY clauses sorts the results based on the specified condition.

Q10
True / False

In PostgreSQL, using the > operator in an indexed column's query condition can improve query performance by leveraging the index.

Q11
Single Choice

What will be the result of the following PostgreSQL query?

SQL Code
SELECT 10 > 5;
Q12
Single Choice

What is the output of the following PostgreSQL query?

SQL Code
SELECT 3 < 7;
Q13
Single Choice

Which of the following is the correct PostgreSQL query to check if 20 is less than 15?

Q14
Single Choice

What will the following PostgreSQL query return?

SQL Code
SELECT 'apple' < 'banana';
Q15
Single Choice

Given the following PostgreSQL query, what will be the result?

SQL Code
SELECT 5 > (SELECT COUNT(*) FROM users);
Q16
Single Choice

What is the output of the following PostgreSQL query?

SQL Code
SELECT 15 < 15;
Q17
Single Choice

What does the following PostgreSQL query return?

SQL Code
SELECT 100 > ALL (SELECT age FROM employees);
Q18
Single Choice

What will the following PostgreSQL query return?

SQL Code
SELECT salary < ANY (SELECT salary FROM employees WHERE department = 'Sales');
Q19
Single Choice

In PostgreSQL, what does the following query check?

SQL Code
SELECT age > (SELECT AVG(age) FROM employees);
Q20
Single Choice

Consider the following PostgreSQL query:

SQL Code
SELECT employee_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE department = 'HR');
What is the purpose of this query?
Q21
Multiple Choice

Identify the SQL scripts that correctly use the '>' and '<' operators to filter numeric values in PostgreSQL.

Q22
Multiple Choice

Select the SQL scripts that correctly use the '>' and '<' operators with dates in PostgreSQL.

Q23
Multiple Choice

Determine the SQL scripts that correctly use the '>' and '<' operators with text values in PostgreSQL.

Q24
Multiple Choice

Identify the SQL scripts that correctly use the '>' and '<' operators with JOINs in PostgreSQL.

Q25
Multiple Choice

Select the SQL scripts that correctly use the '>' and '<' operators with aggregate functions in PostgreSQL.

Q26
Multiple Choice

Determine the SQL scripts that correctly use the '>' and '<' operators with window functions in PostgreSQL.

Q27
Multiple Choice

Identify the SQL scripts that correctly use the '>' and '<' operators with UNION in PostgreSQL.

Q28
Multiple Choice

Determine the SQL scripts that correctly use the '>' and '<' operators with EXISTS in PostgreSQL.

Q29
Multiple Choice

Identify the SQL scripts that correctly use the '>' and '<' operators with DISTINCT in PostgreSQL.

Q30
Multiple Choice

Determine the SQL scripts that correctly use the '>' and '<' operators with LIMIT OFFSET in PostgreSQL.