adplus-dvertising
frame-decoration

Question

Observe the given SQL query and choose the correct option.
SELECT branch_name, COUNT (DISTINCT customer_name) 
FROM depositor, account 
WHERE depositor.account_number = account.account_number 
GROUP BY branch_id

a.

The query is syntactically correct but gives the wrong answer

b.

The query is syntactically wrong

c.

The query is syntactically correct and gives the correct answer

d.

The query contains one or more wrongly named clauses.

Posted under DBMS

Answer: (b).The query is syntactically wrong

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Observe the given SQL query and choose the correct option.

Similar Questions

Discover Related MCQs

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

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

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

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. State true or false: We can rename the resulting attribute after the aggregation function has been applied

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

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

Q. What is a subquery?

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

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

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

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

Q. What is a correlated sub-query?

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

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

Q. SQL subqueries that can occur wherever a value is permitted provided the subquery gives only one tuple with a single attribute are called _________

Q. Insert the appropriate key word in the blank in the query ( A is a relation)
delete ______ A

where P < 5;

Q. How many relations can a delete command operate on?

Q. What is the format of entering date into a database while inserting data into it?

Q. To change a value in a tuple without changing all the values in the tuple, we use the _____ statement