Consider the following TSQL statement: SELECT ID, AVG(SALARY)AS \'AVG\', Sum(SAL
ID: 3866716 • Letter: C
Question
Consider the following TSQL statement: SELECT ID, AVG(SALARY)AS 'AVG', Sum(SALARY) AS 'SUM', F_NAME as 'FIRSTNAME', L_NAME FROM EMPLOYEES GROUP BY ID HAVING L_NAME IS NOT NULL ORDER BY F_NAME, L_NAME This query result in an error. Which of the following statements correctly identifies the reason why? A The order by clause must the aliases identified in the select clause. B The having clause must contain all aggregate columns. C The select clause has incorrect use of aliases. D The group by clause must contain all non-aggregated columns.Explanation / Answer
Anwer C;
SELECT clause has incorrect use of aliases.
Sigle quotes should be removed from the Alias names
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.