adplus-dvertising
frame-decoration

Question

Choose the correct option regarding the following query:
WITH max_marks (VALUE) AS
(SELECT MAX(marks)
FROM student)
SELECT studentID
FROM student,max_marks
WHERE student.marks = max_marks.value;

a.

The query is syntactically wrong

b.

The query gives the studentID of the student with the maximum marks

c.

The query gives the maximum marks amongst all the students

d.

The query gives all the studentID values except the student with the maximum marks

Posted under DBMS

Answer: (b).The query gives the studentID of the student with the maximum marks

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Choose the correct option regarding the following query:

Similar Questions

Discover Related MCQs

Q. State true or false: We can use Subqueries inside the from clause

Q. The _________ construct returns true if the argument in the sub-query is void of duplicates

Q. What is a correlated sub-query?

Q. The ______ construct returns true if a given tuple is present in the subquery.

Q. The ________ comparison checker is used to check “each and every” condition

Q. State true or false : Nested Subqueries cannot be used for comparing two different sets

Q. If a set is a collection of values given by the select clause, The ______ connective tests for set membership

Q. What is a subquery?

Q. What values does the count(*) function ignore?

Q. Which keyword is used to rename the resulting attribute after the application of the aggregation function?

Q. State true or false: We can rename the resulting attribute after the aggregation function has been applied

Q. State true or false: Any attribute which is present in the having clause without being aggregated must not be present in the group by clause.

Q. The _____ aggregation operation adds up all the values of the attribute

Q. We apply the aggregate function to a group of sets of tuples using the _______ clause.

Q. State true or false: SQL does not permit distinct with count(*)

Q. Which of the following is not a built in aggregate function in SQL?

Q. Which of the following correctly describes the between predicate in the where clause?

Q. Using the _______ clause retains only one copy of identical tuples

Q. When does the predicate is null succeed?

Q. What is the function of the except operation?