1. Which of the following is not a built in aggregate function in SQL?
2. 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.
3. State true or false: SQL does not permit distinct with count(*)
4. We apply the aggregate function to a group of sets of tuples using the _______ clause.
a) group by
c) group set
d) group attribute
5. Choose the correct option regarding the query
SELECT branch_name, COUNT (DISTINCT customer_name) FROM depositor, account WHERE depositor.account_number = account.account_number GROUP BY branch_id HAVING avg(balance) = 10000;
a) The having clause checks whether the query result is true or not
b) The having clause does not check for any condition
c) The having clause allows only those tuples that have average balance 10000
d) None of the mentioned
6. The _____ aggregation operation adds up all the values of the attribute
7. 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.
8. State true or false: We can rename the resulting attribute after the aggregation function has been applied
9. Which keyword is used to rename the resulting attribute after the application of the aggregation function?
10. What values does the count(*) function ignore?
a) Repetitive values
b) Null values