SELECT dept_name, ID, avg (salary)
FROM instructor
GROUP BY dept_name;
This statement IS erroneous because
Avg(salary) should not be selected
Dept_id should not be used in group by clause
Misplaced group by clause
Group by clause is not valid in this query
Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api
# | Quiz |
---|---|
1
Discuss
|
The EXISTS keyword will be true if:
Solution |
2
Discuss
|
How can you find rows that do not match some specified condition?
Solution |
3
Discuss
|
SQL applies predicates in the _______ clause after groups have been formed, so aggregate functions may be used.
Solution |
4
Discuss
|
Which of the following is not an aggregate function?
Solution |
5
Discuss
|
Which of the following creates a temporary relation for the query on which it is defined?
Solution |
6
Discuss
|
Aggregate functions can be used in the select list or the_______clause of a select statement or subquery. They cannot be used in a ______ clause.
Solution |
7
Discuss
|
In the query given above which one of the following is a temporary relation?
Solution |
8
Discuss
|
The ________ keyword is used to access attributes of preceding tables or subqueries in the from clause.
Solution |
9
Discuss
|
Subqueries cannot:
Solution |
# | Quiz |
Copyright © 2020 Inovatik - All rights reserved