Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please tell me what is wrong with the SQL statements included in the picture. 17. The following table lists SQL statements illustrating popular errors in
Please tell me what is wrong with the SQL statements included in the picture.
17. The following table lists SQL statements illustrating popular errors in the use of the GROUP BY and HAVING clauses, and Aggregate (Column) Functions. Using the following table CLEARLY describe each error Restrictions Column functions may be specified only in - SELECT -HAVING - SELECT may specify only Column functions Columns specified in 'GROUP BY HAVING may specify - Any column function on any column in a table being queried This column need not be in the SELECT - Column functions may not be nested Incorrect GROUP BY or Aggregate Function Error hat is wrong with these SQL statements? EMPNO, WORKDEPT, SUM(SALARY) FROM EMP GROUP BY WORKDEPT HAVING SUM(SALARY) > 30000 SE FROM EMP WHERE AVG(SALARY) > 25000 GROUP BY WORKDEPT SE FROM EMP WHERE SEX="F". GROUP BY WORKDEPT HAVING EDLEVEL >18 SELECT WORKDEPT, SUM(SALARY) FROM EMP WHERE SEX="F". HAVING SUM(SALARY) >25000 SELECT WORKDEPT, SUM(SALARY) FROM EMP WHERE SEX="F". GROUP BY EDLEVEL HAVING SUMISALARYM > 25000 WORKDEPT, AVG(SALARY) WORKDEPT, SUM(SALARY)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started